A modern template for exploring React Server Components (RSC) with React Router, powered by Vite.
- ๐งช 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
- ๐ React Router docs
- ๐ React Server Components guide
Install the dependencies:
pnpm installIn one tab, start the database server:
pnpm dbIn another tab:
Migrate the database:
pnpm db:migrateStart the development server with HMR:
pnpm devYour application will be available at http://localhost:5173.
Create a production build:
npm run buildThis 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
Learn more about React Server Components with React Router in our comprehensive guide.
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.