Welcome to React Router! (Experimental RSC)

โš ๏ธ EXPERIMENTAL: This template demonstrates React Server Components with React Router. This is experimental technology and not recommended for production use.

A modern template for exploring React Server Components (RSC) with React Router, powered by Vite.

Features

  • ๐Ÿงช 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

Getting Started

Installation

Install the dependencies:

pnpm install

Development

In one tab, start the database server:

pnpm db

In another tab:

Migrate the database:

pnpm db:migrate

Start the development server with HMR:

pnpm dev

Your application will be available at http://localhost:5173.

Building for Production

Create a production build:

npm run build

Understanding React Server Components

This template includes three entry points:

  • entry.rsc.tsx - React Server Components entry point
  • entry.ssr.tsx - Server-side rendering entry point
  • entry.browser.tsx - Client-side hydration entry point

Learn more about React Server Components with React Router in our comprehensive guide.

Styling

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.