-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Micro State Management with React Hooks
By :

So far, we have been exploring some basic patterns we can use to implement a global state in React. In this chapter, we will learn about a real implementation that is publicly available as a package, called Zustand.
Zustand (https://github.com/pmndrs/zustand) is a tiny library primarily designed to create module state for React. It's based on an immutable update model, in which state objects can't be modified but always have to be newly created. Render optimization is done manually using selectors. It has a straightforward and yet powerful store
creator interface.
In this chapter, we will explore how module state and subscriptions are used and see what the library API looks like.
In this chapter, we will cover the following topics: