Summary
In this chapter, before diving into the actual implementation of global state libraries, we learned about some basic challenges associated with it, and some categories to differentiate global state libraries. When choosing a global state library, we can see how the library lets us read a global state and write a global state, where the library stores a global state, and how the library optimizes re-renders. These are important aspects to understand which libraries work well for certain use cases, and they should help you to choose a library that suits your needs.
In the next chapter, we will learn about the Zustand library, a library that takes a data-centric approach and optimizes re-renders with selector functions.