Two opposite ideas live side by side in modern web development. On one hand, JSX has become the gold standard for readable markup: composing UI from small parameterized functions is clean and intuitive. On the other hand, to render a simple product card, browsers often end up doing double work—receiving finished HTML from the server, then downloading a hefty JavaScript bundle just to rebuild the component tree in mobile memory for a single button.
When I spotted the open-source Node.js framework Jeasx (created by Maik Jablonski, MIT license) in the Best of JS directory, its straightforwardness hooked me immediately. Can you keep the ergonomics of JSX without forcing hydration and extra JavaScript onto the browser? All it takes is letting JSX stay on the server as a templating engine.
Why Hydration Is Overkill for Content and How Server-Side JSX Works
Let's translate "hydration" into everyday terms. Imagine movers have already carried an assembled bookshelf into your room and set it against the wall—and then a second crew walks in with blueprints and re-tightens every shelf just to verify the door hinges. That's what client-side hydration does: the server already sent the HTML, yet the browser downloads a runtime, re-runs your component functions, builds a virtual copy of the page in memory (the virtual DOM), and diffs it against what's already on screen, delaying First Contentful Paint (FCP) and Time to Interactive (TTI).
Compare how two approaches handle a dynamic catalog:
- A classic SPA framework renders the page on the server, serializes the data into JSON, and ships a runtime to the browser to re-execute the code.
- The Jeasx server framework leans on the fact that JSX is just syntax for JavaScript function calls. The server runs them once and streams clean HTML and CSS with zero client JavaScript by default.
Fastify, esbuild, and jsx-async-runtime: Streaming a Catalog Page
Under the hood (documented at jeasx.dev), the project pairs Fastify, esbuild, and jsx-async-runtime. Routes map directly to files in routes/, and any component can be declared as async. Thanks to Streaming SSR, Fastify flushes <head> into the socket immediately while your database query is still in flight.
Let's put together a product route routes/products/[id].jsx that looks up an item by its URL id, returns 404 if it's missing, and renders an add-to-cart form:
// routes/products/[id].jsx — server route in Node.js
export default async function ProductPage({ request, reply, params }) {
const product = await getProductById(params.id);
if (!product) {
reply.status(404);
return <h1>Товар не найден</h1>;
}
return (
<html lang="ru">
<head>
<title>{product.title} — Каталог</title>
<link rel="stylesheet" href="/assets/style.css" />
</head>
<body>
<main class="product-card">
<h1>{product.title}</h1>
<p class="price">{product.price} ₽</p>
<div class="description">{product.description}</div>
<form method="POST" action={`/api/cart/add?id=${product.id}`}>
<button type="submit">Добавить в корзину</button>
</form>
</main>
</body>
</html>
);
}
When a request hits the route, the server passes request, reply, and params into ProductPage. Calling await getProductById(params.id) queries the database straight from the component with no intermediate hooks. If nothing comes back, reply.status(404) sets the status code; otherwise, jsx-async-runtime streams the HTML along with a standard <form method="POST">.
Dropping browser-side in-memory state altogether does come with an architectural ceiling: Jeasx isn't meant for graphic editors or dashboards packed with dozens of live filters, and its plugins tie into the Fastify ecosystem. When you need targeted interactivity on top of HTML, you reach for Web Components or hypermedia libraries (we broke down how they update the DOM without full page reloads in our look at hypermedia architecture without heavy SPAs).
Don't worry if you'd rather not spin up a complex client architecture on day one of a new catalog—you don't need a heavy combine harvester just to plant a small garden. Starting with simple server-rendered JSX pages and layering scripts in only where needed is a calm, practical path you can test right away in Jeasx Expo or the jeasx-develop sandbox.
