Chapter 11: Similarities and Differences between Three Global State Libraries
In this book, we introduced three global state libraries: Zustand, Jotai, and Valtio. Let's discuss some similarities and differences between them. These three libraries have some comparable features.
Zustand is similar to Redux (and React Redux) in terms of usage and the store model but, unlike Redux, it's not based on reducers.
Jotai is similar to Recoil (https://recoiljs.org) in terms of the API, but its goal is more to provide a minimal API for non-selector-based render optimization.
Valtio is similar to MobX in terms of the mutating update model, but the level of similarity is only minor, and the render optimization implementation is very different.
All three libraries provide primitive features that fit with micro-state management. They differ in their coding style and approach to render optimization.
In this chapter, we discuss each library by pairing it with its comparable...