FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
project logo

jxnblk

react-router-hono-starter

Minimal React Router + Hono starter example
Remix of jxnblk/react-router-data-mode-starter
Public
Like
react-router-hono-starter
Home
Code
4
README.md
client.tsx
routes.tsx
H
server.tsx
Branches
3
Pull requests
Remixes
3
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: v31
View latest version
README.md

React Router Hono Starter

Minimal React Router + Hono starter example in "data mode" with server-side rendering for Val Town

View demo

How it works

The server.tsx file is the main server that responds with an HTML stream, using React Router, or an API response. The HTML includes a <script type="module"> tag that loads the client.tsx file to hydrate the app with client-side routing provided by React Router in "data mode".

The routes are defined in routes and can include data loading and actions. The /about route includes a loader that fetches data from the /api route, which returns a JSON response. The About page uses the useLoaderData hook to render the data from the loader in the page.

View more starters

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.