Why it matters

Scala.js enables Scala frontends. Understanding shapes full-stack Scala.

Advertisement

The architecture

Compile Scala → optimized JS.

Interop: Scala facades for JS libraries.

Scala.js characteristicsScala sourcecompile to JSOptimized JSsmall + fastInterop with JSlibrariesPopular frontend libraries: Slinky (React), Laminar (native), Tyrian
Scala.js compilation.
Advertisement

How it works end to end

Frameworks: Slinky (React wrapper), Laminar (native Scala.js), Tyrian.

Shared code: same Scala code on backend + frontend.

Bundle size: comparable to hand-written JS.

Debugging: source maps for readable stack traces.