rsnext/examples/with-recoil
Alexej Dyschelmann 6163f30ad8
[with-recoil example] use functional form of state updaters for simplicity (#14014)
This is probably a pretty subjective change, but one might argue it less complex and may have minimally less overhead.
2020-06-13 09:04:34 +00:00
..
components Adding Example: with-recoil (#13380) 2020-06-08 21:33:08 -04:00
lib [with-recoil example] use functional form of state updaters for simplicity (#14014) 2020-06-13 09:04:34 +00:00
pages Adding Example: with-recoil (#13380) 2020-06-08 21:33:08 -04:00
package.json Adding Example: with-recoil (#13380) 2020-06-08 21:33:08 -04:00
README.md Adding Example: with-recoil (#13380) 2020-06-08 21:33:08 -04:00

Recoil Example

This example shows how to integrate Recoil in Next.js.

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:

Deploy with Vercel

How to use

Using create-next-app

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

npx create-next-app --example with-recoil with-recoil-app
# or
yarn create next-app --example with-recoil with-recoil-app

Download manually

Download the example:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-recoil
cd with-recoil

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Deploy it to the cloud with Vercel (Documentation).