Example of using vite-plugin-ssr
with React that showcases many features.
For a simpler example, check out /examples/react/.
Features:
- Client Routing (+ usage of
navigate()
) - Data Fetching (server-side fetching + isomorphic fetching)
- Pre-rendering (+ usage of the
prerender()
hook) - Route Function
- TypeScript
- Markdown
- Error Page
- Active Links
- Access
pageContext
from any React component (using React Context) - HTML streaming
To run it:
git clone git@github.com:brillout/vite-plugin-ssr
cd vite-plugin-ssr/examples/react-full/
npm install
npm run start