Recoil is an experimental state management framework for React.
It provides multiple capabilities that are hard to achieve with react alone, while being compatible with the newest features of react.
Atoms: Atoms contain the source of truth for our application state. In our todo-list, the source of truth will be an array of objects, with each object representing a todo item.
Selectors: A selector represents a piece of derived state. You can think of derived state as the output of passing state to a pure function that derives a new value from the said state.
yarn add recoil
Although Recoil is still in development, I'm amazed by the simplicity of its API.
I'm sure that in the short term, it will be replacing Redux in many projects.
Go back to Projects