Less framework, fewer headaches
Jeasx keeps its core small: async JSX, file-based routing and little else. Everything beyond that is plain code you own and can adapt. These examples show how.
JSX with Ease
Render pages on the server with async JSX, and run the same components in the browser when you need to.
Browse examplesVisit jeasx.dev
Jeasx keeps its core small: async JSX, file-based routing and little else. Everything beyond that is plain code you own and can adapt. These examples show how.
All examples are on GitHub. Clone the repository, run them locally and change the code freely. Every example links to its source in the top right corner.
At its core, Jeasx turns JSX into HTML using jsx-async-runtime. If you know JSX from React, it will feel familiar, but there's a twist: components can be async, so they can simply await data before rendering. The examples in this section show how that works on the server, how pages can stream to the browser piece by piece, and how the very same components can also run in the browser.
Learn how JSX works on the server, where every component simply returns HTML. These examples show what you can put into JSX (text, numbers, arrays, even promises that resolve later), how to pass request data down to every component without prop drilling, how to reuse layouts with render props, how to tweak the generated HTML globally, how to build web components with Shadow DOM, and how to test your components like plain functions.
Slow data shouldn't make your visitors stare at a blank screen. With streaming, the browser receives and shows the parts of a page that are ready right away, while slower parts (like a sluggish API) follow as soon as they arrive. These examples show different strategies: loading several sources at once, filling placeholders in any order, loading content only when it scrolls into view, and streaming from async iterables or a ReadableStream.
"Isomorphic" means the same code runs on the server and in the browser. The server sends a fully rendered first page, so it loads fast and works without JavaScript. Once JavaScript is available, the browser takes over and re-renders the very same JSX components after every click, with no React, virtual DOM or hydration step involved. Try the interactive apps below, then turn off JavaScript: they still work with plain HTML forms.
JSX isn't only for servers: jsx-async-runtime also renders directly in the browser. These examples are fully interactive pages built entirely on the client, from components that fetch their own data and live-updating feeds to small games that redraw the screen many times per second. A good place to see how far plain JSX can go without a big frontend framework.
Jeasx is more than a JSX renderer: it's a complete framework for building and running real websites. This section walks through typical tasks from a first page to a production-ready site, including server-rendered pages and forms, generating images, PDFs and emails, live updates, and the security and error handling every public site needs.
The classic way to build for the web: the server builds the complete HTML page and the browser just displays it. These examples cover typical real-world sites, such as a blog, a product catalog, a cookbook written in Markdown (MDX) and a multi-step booking form, using data from APIs or JSON files. They work without any client-side JavaScript; where JavaScript is available, extras like smooth page transitions and instant form validation make them feel even nicer (this is called progressive enhancement).
A route in Jeasx is just a function that answers a request, so it can send back much more than web pages. These examples use JSX to generate SVG graphics, HTML emails, PDF documents and social media preview images, scale and upload images, and push live updates to the browser with Server-Sent Events or WebSockets. You'll also see how one URL can serve different formats depending on what the client asks for.
Everything a real site needs before going live. Learn how to restrict pages to logged-in users (with a simple password prompt or a full login with sessions), keep cookies tamper-proof, defend against injected scripts with a Content Security Policy, keep bots out with a captcha, and limit how often an API can be called. The remaining examples show how to show friendly error pages and how to clean up or adjust the final HTML just before it is sent to the browser.
Jeasx doesn't need special plugins or adapters to work with other tools. You connect libraries like HTMX, React, Vue or Svelte yourself, with a few lines of ordinary code that you can read, understand and change. This section shows how, so you can add interactivity with the tools you already know.
HTMX is a small library that lets you make pages interactive by adding HTML attributes instead of writing JavaScript. When a user clicks or types, HTMX asks the server for a piece of HTML and swaps it into the page. Since every Jeasx route can return such HTML snippets, the two fit together naturally. These examples show common patterns like inline editing, search-as-you-type and infinite scrolling.
Already know React, Vue, Svelte or another frontend framework? You can keep using it. Most of the page is rendered as fast, static HTML on the server, and your favorite framework only powers the small interactive parts (so-called islands), like a counter or a widget. Each example shows the full setup in plain code, with no special plugins, and the last one mixes several frameworks on a single page.