React vs htmx + Solid: one app, two stacks

The same small app built twice with cascivo, then measured with one script. Use it to pick a stack for a new app. It is not a ranking of the two stacks.

Reacthtmx + Solid
Appapps/examples/track-liteapps/examples/track-lite-htmx
UI@cascivo/react componentsserver HTML on the @cascivo/css contract, @cascivo/elements, one @cascivo/solid island
Statea module signal in the browser (no backend, as in Track)axum + cascivo-server: memory store, sessions, CSRF
Live updatesa setInterval teammate in the taba server teammate task + SSE Hub fan-out to every open tab
TestsVitest + Testing Library, 4 flowsRust oneshot smoke test, 8 flows (incl. CSRF, 422, SSE)

The app

A slice of the React Track example:

The two apps start from the same seed, make the same teammate moves and use the same layout CSS. Screenshots of both at 900 px show the same layout. The small differences:

The React app keeps its state in the browser, like Track. The htmx app has a real multi-user server. That makes the comparison honest about what each one costs to build, but it is not a like-for-like backend. Keep this in mind when you read the LOC numbers.

Results

Reproduce with pnpm compare:react-vs-htmx. The script builds both apps and the release server. It serves the React dist/ from a plain static server and runs the axum binary with the teammate off. Then it drives each app in headless Chromium with the CPU throttled 4x (RUNS, CPU_THROTTLE, --json <file>, SKIP_BUILD=1). The script computes gzip -9 sizes from the response bodies, so the server's compression does not change the numbers.

Measured on 2026-11-25: 4-core Xeon container, Chromium headless, localhost, 4x CPU throttle, median of 5 runs.

MetricReact (track-lite)htmx + Solid (track-lite-htmx)
JS (raw / gzip)226.9 KB / 71.5 KB89.8 KB / 28.5 KB
JS files (gzip KB)one bundle 71.5htmx + sse 18.4, elements 6.2, Solid island 3.9
CSS (raw / gzip)95.6 KB / 11.6 KB174.5 KB / 20.8 KB
HTML (raw / gzip)0.4 KB / 0.3 KB16.7 KB / 2.9 KB
Requests on load36 (page, CSS, 3 scripts, SSE)
FCP276 ms248 ms
LCP276 ms248 ms
Ready (first click that opens the dialog)427 ms419 ms
One "Advance" click on the wire0 requests1 request, 9.7 KB raw / 0.9 KB gzip
App LOC (non-blank; htmx includes Rust + templates)348707
Test LOC43237
Dependencies (direct / installed closure)npm 7 / 18npm 7 / 21, cargo 8 / 83

Timings move by about ±20 ms between runs on this machine. Byte counts do not change.

What the numbers say

Trade-offs

Where htmx + Solid wins

Where React wins

Known rough edges found while building it

When to pick which

As Markdown: /docs/compare-react-vs-htmx-solid.md

← All guides