From the course: React: Software Architecture

Unlock the full course today

Join today to access over 24,100 courses taught by industry experts.

Medium state with Recoil

Medium state with Recoil

- [Instructor] Okay, the next state management tool that we're going to take a look at is called Recoil. Now, Recoil is a fairly new player in the state management world. It was created as a way to help us manage the state of larger applications while still making things like code splitting fairly easy to do. Now I'm not going to go into too much depth on things like code splitting, but what we are going to do is use Recoil to reimplement our Counter button example, and this will allow us to see some of its core concepts. So let's head back to our Counter button example. And what we're going to do is rewrite our Counter button so that it uses Recoil instead of Context, which is the last one that we looked at. So the first step in integrating Recoil, since Recoil is not included by default with the React library, the first thing we have to do is install it. So we're going to say npm install recoil, in our project. And…

Contents