hono-preact v0.5.1

A small full-stack framework.

Hono on the edge, Preact in the browser, manifest driven routes, typed RPC, streaming everywhere.

Keep it simple

vite.config.ts
import { defineApp } from 'hono-preact/vite';
export default defineApp();
src/routes.ts
import { defineRoutes } from 'hono-preact';
export default defineRoutes([
  { path: '/', view: () => import('./views/home') },
]);
src/views/home.tsx
export default function Home() {
  return <h1>Hello</h1>;
}
src/Layout.tsx
import { ClientScript, Head } from 'hono-preact';
export default function Layout({ children }) {
  return (
    <html>
      <Head defaultTitle="hono-preact" />
      <body>
        <main id="app">{children}</main>
        <ClientScript />
      </body>
    </html>
  );
}

Manifest-driven routes

Your routes are a data structure, not a directory tree.

Typed RPC, end to end

Loaders and actions are typed functions; the client gets a typed stub.

Streaming everywhere

Loaders, forms, SSE. Built on ReadableStream.

One package

hono-preact, hono-preact/server, hono-preact/vite. Nothing else to install.