SvenJS 3

Heritage

SvenJS 2.0.2 was a microframework from the Webpack 4 / Babel RC years. Components were plain objects with render and setState. JSX came from a separate svenjsx-loader. Every update cleared the root with innerHTML = "" and rebuilt the tree.

Version 3 keeps the mental model and throws away the implementation.

2.x
Webpack 4, Babel 7 RC, tape, jsdom, a custom JSX loader
3.x
TypeScript, Vite, Vitest, native automatic JSX runtime
2.x update
Wipe the DOM, run render(), insert a new tree
3.x update
Clone + freeze state, keyed vnode patch, batched microtask flush
Lifecycle
_didMount / _didUpdate / _beforeMount still work. Prefer onMount, onUpdate, onDestroy.
Store
listenTo / emit remain as aliases around subscribe / set.

This is not a drop-in for 2.0.2. There is no svenjsx-loader, no require("dist/index.js"), and no promise that old examples compile unchanged. The demos were ported by hand.

Write a component or open the playground.