Course lesson
Set Up Recoil in a new React App
We'll create a new React game with:
- Duration
- 1 min
- Access
- Free
- Transcript
- Available
We'll create a new React game with:
npx create-react-app paper-game
cd paper-gameand then install Recoil with:
npm install recoiland start the server:
npm startThen, to wrap the entire app in the recoil root, we'll import RecoilRoot from recoil and wrap the app:
<RecoilRoot>
<Game />
</RecoilRoot>And the app is now up and running - ready to use Recoil