• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
project logo

jxnblk

hanabi

React Router for Hono in Val Town
Public
Like
hanabi
Home
Code
3
example
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/16/2025
Viewing readonly version of main branch: v30
View latest version
README.md

Hanabi

React Router + Hono middleware

Create val
// usage: define routes for your app and export them with `hanabi` /** @jsxImportSource https://esm.sh/react@19 */ import React from "https://esm.sh/react@19"; import { useLoaderData, Link, Outlet } from "https://esm.sh/react-router@7"; import hanabi from "https://esm.town/v/jxnblk/hanabi/main.tsx"; function Home () { return ( <div> <Link to="/">Home</Link> <Link to="/about">About</Link> <h1>Home page</h1> </div> ) } function About () { return ( <div> <Link to="/">Home</Link> <Link to="/about">About</Link> <h1>About page</h1> </div> ) } const routes = [ { Component: Home, index: true }, { Component: About, path: "about" }, ]; export default hanabi(routes);
Create val
// in your Hono app, export the routes to render the app import { Hono } from "npm:hono@4"; import routes from "./routes.tsx"; const app = new Hono(); app.get("*", routes); export default app.fetch;
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.