1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Set Up Recoil in a new React App

    reactReact

    We'll create a new React game with:

    npx create-react-app paper-game
    cd paper-game

    and then install Recoil with:

    npm install recoil

    and start the server:

    npm start

    Then, 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