A modern template for exploring React Server Components (RSC) with React Router, powered by Vite and served with Hono using Node.js native TypeScript support. Formatted with Biome.
- 🧪 Experimental React Server Components
- 🚀 Server-side rendering with RSC
- ⚡️ Hot Module Replacement (HMR)
- 📦 Asset bundling and optimization with Vite
- 🔄 Data loading and mutations
- 🔒 TypeScript by default
- 🎉 TailwindCSS for styling
- 🌐 Hono - Fast, lightweight web framework for the server
- 🧹 Biome - Fast formatter and linter for consistent code style
- 📖 React Router docs
- 📚 React Server Components guide
- 🔥 Hono documentation
- ⚡ Biome documentation
- Node.js 22.6+ - Required for native TypeScript support with type stripping
Create a new project using this template:
npx degit bskimball/rr-rsc my-app
cd my-app
npm install
npm run devInstall the dependencies:
npm installStart the development server with HMR:
npm run devYour application will be available at http://localhost:5173.
Create a production build:
npm run buildRun the production server (powered by Hono and Node.js):
npm startThe production server uses:
- Node.js 22.6+ with native TypeScript support (type stripping enabled by default)
- Hono as the web framework for fast, efficient request handling
- Compression middleware and static asset serving
- Customizable port via the
PORTenvironment variable (defaults to 3000)
Build and run with Docker (uses Node.js 24 Alpine):
docker build -t rr-rsc .
docker run -p 3000:3000 rr-rscOr with custom port:
docker run -p 8080:8080 -e PORT=8080 rr-rscThe Dockerfile uses a multi-stage build with node:24-alpine for a minimal production image.
This template includes three entry points:
entry.rsc.tsx- React Server Components entry pointentry.ssr.tsx- Server-side rendering entry pointentry.browser.tsx- Client-side hydration entry point
The production server (server.ts) uses Hono to:
- Serve static assets from the build output
- Handle compression with built-in middleware
- Route all requests through the RSC handler
- Provide fast, efficient request processing
Learn more about React Server Components with React Router in our comprehensive guide.
This project uses Biome for fast, consistent code formatting and linting:
Format your code:
npm run formatCheck for code issues:
npm run lintRun both formatting and linting:
npm run checkBiome is configured to:
- Use double quotes for JavaScript/TypeScript
- Use tab indentation
- Enable recommended linting rules
- Automatically organize imports
This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
Built with ❤️ using React Router, Hono, Node.js, and Biome.