Skip to content

brunos3d/nextjs-recoil-initial-state-ssr

Repository files navigation

valor-logo

Created by Valor Software

Recoil + Next.js SSR Example

This example shows how to integrate Recoil in Next.js and initialize state on server-side.

Recoil is an experimental set of utilities for state management with React used by some teams at Facebook. This example takes the code from the redux examples and demonstrates how it would be implemented with Recoil.

Deploy your own

Deploy the example using Vercel or preview live with StackBlitz

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example https://github.com/brunos3d/nextjs-recoil-initial-state-ssr
# or
yarn create next-app --example https://github.com/brunos3d/nextjs-recoil-initial-state-ssr
# or
pnpm create next-app --example https://github.com/brunos3d/nextjs-recoil-initial-state-ssr

Deploy it to the cloud with Vercel (Documentation).