Post

Stator 2.0 is out 🎉 🌶️ We removed two-way binding read() is now the only display primitive. Its the same in a server template or a client island - the compiler picks the right mechanism for each. Writes are typed events that machines declares and the compiler checks statorjs.dev #StatorJS #webdev

statorjs.devStator · the server-canonical JavaScript framework built on state machinesA web framework where state machines are the unit of composition and the DOM renders where its state lives — almost always the server.

The same API everywhere: `<p>{read(cart, c => c.itemCount)}</p>` Server machine → updates the client by wire patch. Client machine in an island → updates by local subscription. The compiler routes it by where the machine lives. You stop thinking about which side you're on.

Forms without a binding layer: The input owns your draft, with cursor, IME, and undo all native. A typed event commits it, and a refused commit keeps your typing. Pre-fill is just server rendering: value and checked are attributes, and false renders absent. No echo loop to manage.

0 reposts0 likes

Why? Two-way binding wrote state through a side channel that skipped guards and types. In 2.0 the machine definition is the complete list of what can happen. pnpm create stator my-app --template registration Our codebase held exactly one two-way binding. Migration was one line ✂️