Same app, four ways
One shopping list, built four times: with Jeasx, Lit, HTMX and React. All four share the same update function and the same styles. What differs is where the list lives and how much JavaScript it takes.
Each card measures the JavaScript it downloaded and when it became usable. To see the difference, throttle the network in the dev tools, or see what is left without JavaScript.
Jeasx
Isomorphic JSX: the browser renders the same component as the server and saves in the background. Without JavaScript, the forms post to the server.
- JavaScript
- …
- Interactive
- …
- State
- server
Lit
A web component which renders in the browser. Until its bundle runs, the card is empty.
- JavaScript
- …
- Interactive
- …
- State
- browser
HTMX
The same forms, sent in the background. The server answers with the new list only.
- JavaScript
- …
- Interactive
- …
- State
- server
React
Rendered on the server, then hydrated. Clicks only work once React has loaded.
- JavaScript
- …
- Interactive
- …
- State
- browser
Reload the page: the Jeasx and HTMX lists keep your changes, as they live in a cookie on the server. The React and Lit lists start over, as their state only lives in the browser.