https://github.com/brunos3d/nextjs-recoil-initial-state-ssr
This example shows how to integrate Recoil in Next.js and initialize state on server-side.
https://github.com/brunos3d/nextjs-recoil-initial-state-ssr
bootstrap init initialize javascript management next nextjs props react recoil seo server server-side ssr state typescript
Last synced: 4 months ago
JSON representation
This example shows how to integrate Recoil in Next.js and initialize state on server-side.
- Host: GitHub
- URL: https://github.com/brunos3d/nextjs-recoil-initial-state-ssr
- Owner: brunos3d
- Created: 2022-07-26T19:14:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-26T19:15:04.000Z (about 3 years ago)
- Last Synced: 2025-04-23T22:35:15.862Z (6 months ago)
- Topics: bootstrap, init, initialize, javascript, management, next, nextjs, props, react, recoil, seo, server, server-side, ssr, state, typescript
- Language: TypeScript
- Homepage:
- Size: 62.5 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](https://recoiljs.org) 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](https://vercel.com) or preview live with [StackBlitz](https://stackblitz.com/github/brunos3d/nextjs-recoil-initial-state-ssr)
[](https://vercel.com/new/git/external?repository-url=https://github.com/brunos3d/nextjs-recoil-initial-state-ssr&project-name=nextjs-recoil-initial-state-ssr&repository-name=nextjs-recoil-initial-state-ssr)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
```bash
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](https://vercel.com/new) ([Documentation](https://nextjs.org/docs/deployment)).