Summary
In this chapter, we covered Jotai, a new kid on the block of state management libraries. Inspired by a new, atomic approach to state management proposed by Facebook through their library named Recoil, Jotai has become more and more popular within the React community. It offers a bottom-up approach, as opposed to top-down libraries, such as Redux or MobX. It’s honestly stupidly easy to configure and use. It doesn’t offer many utilities, but the documentation is very clear and easy to use. In this chapter, we managed to use it to fetch and store data, and we also used it to implement actions on that data, such as adding items to an array. Jotai marks the end of our journey with classic state management libraries.
In the next chapter, we’ll talk about React Query, which is not a state management library, but a data-fetching library. It does have its place in this book, however. More on that in the next chapter! See you there!