Why Zustand?
Zustand is small, fast, and scalable. It has a comfortable API based on hooks.
Creating a Store
typescript
import { create } from 'zustand'
const useStore = create((set) => ({
bears: 0,
increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
removeAllBears: () => set({ bears: 0 }),
}))
Using the Store
Bind components to the store state.
Comparison with Redux
Zustand is much less boilerplate-heavy than Redux.
"Simplicity is the soul of efficiency."
