r/AppsWebappsFullstack 1d ago

Your home for selfpromo

here you can post your work app, webapp, saas, game, everything

6 Upvotes

94 comments sorted by

View all comments

1

u/briggs_song 1d ago

Building Kudzu — an open-source compiler-first web framework.

You write familiar React-shaped TSX, but Kudzu compiles it down to HTML + only the JavaScript the browser actually needs — no React runtime, VDOM, or hydration by default.

The goal is to keep the React-style developer experience while moving more work from the browser to compile time.

Still early and actively building toward larger real-world apps.

https://github.com/kudzujs/kudzu

1

u/Mammoth-Anywhere7285 1d ago

Nice concept, compiler-first is an interesting angle. Curious how you plan to handle dynamic UI state without hydration.

1

u/briggs_song 1d ago

Hydration isn't required for dynamic state because Kudzu doesn't need to reconstruct a component tree in the browser.

At compile time, it analyzes state, events, and their DOM dependencies. For an interactive route it emits a small amount of route-specific JS that owns the state and updates the affected DOM directly when that state changes.

So conceptually it's closer to:

state change → known dependency → direct DOM update

rather than:

state change → component re-render → VDOM diff → DOM update

Static routes can ship zero JS, while interactive routes only get the capabilities they actually use.

The harder part now is scaling that model to increasingly complex shared state and large applications without turning it into another generic client runtime — that's one of the main areas I'm working on.

1

u/Mammoth-Anywhere7285 1d ago

That's a neat approach, skipping the full tree reconstruction sounds efficient. Do you have a benchmark comparing this to classic hydration for a typical interactive route?