Back
Web | Sun Jul 17 2022

Recoil

Thumbnail

What is Recoil?

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.

Key Terms

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.

Installation

yarn add recoil

Conclusion

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.

Youtube GitHubDownload

Go back to Projects