hono-inertia
Build SPA-feel apps with Inertia.js + Hono + hono/jsx
Inertia.js lets you build single-page apps without writing a separate frontend or a JSON API layer. The server returns Inertia responses (page name + props), and a thin client adapter swaps the current page component on the fly. With Hono as the server and hono/jsx as the client, you get SPA interactivity while staying inside one TypeScript stack — no React.
Reach for this when server-rendered hono/jsx is no longer enough — that is, when you need client-side state, optimistic UI, or rich forms.
Stack
- Server:
hono+@hono/inertia. Theinertia({ rootView })middleware addsc.render(name, props)for returning Inertia responses. - Client:
@ts-76/inertia-hono-jsx. ProvidescreateInertiaApp,<Link>,<Form>,<Head>,useForm,useHttp, etc., on top of@inertiajs/coreandhono/jsx/dom. - Bundling / SSR: Vite (with
@cloudflare/vite-pluginwhen deploying to Workers) andvite-ssr-componentsfor asset wiring. Start from thecloudflare-workers+viteHono starter template — it has the Vite + Workers wiring already in place: https://github.com/honojs/starter/tree/main/templates/cloudflare-workers+vite. - Page typing:
@hono/inertia/vitegeneratespages.gen.tssoPagePropsFor<Name>resolves to the props passed toc.render(Name, ...).
Reference example
yusukebe/hono-inertia-example is the canonical layout (Hono + Inertia on Cloudflare Workers). It is written in React, so do not copy its app/client.tsx and app/root-view.tsx verbatim — those need to be rewritten against @ts-76/inertia-hono-jsx and hono/jsx. The server side (app/server.ts, route shape, Vite config, wrangler.jsonc, validation with @hono/zod-validator) transfers as-is.