Traditional SPA frameworks send a large JavaScript bundle to the browser and re-render the entire page on the client. SSR frameworks render HTML on the server but then hydrate the whole tree — doubling the work.
BarefootJS takes a different path. The compiler statically analyzes which parts of your component tree depend on signals, and emits only the minimal DOM operations needed to update those parts. Everything else stays as static HTML.
The compilation happens in two phases. Phase 1 (JSX to IR) extracts the reactive dependency graph. Phase 2 (IR to Client JS) emits event bindings and DOM patches keyed to specific nodes using data-bf-* markers. The server renders the full HTML; the client attaches fine-grained effects to the marked nodes.
The result is a drastically smaller client payload. A typical page with a few interactive islands ships 2-4 KB of client JS rather than 50-200 KB for a full framework bundle. Pages that have no reactive islands ship zero client JS.
This architecture is particularly well-suited to marketing sites, documentation, and content-heavy applications — exactly the pages where SSR matters most for SEO and initial load performance.