11th Practical Class:
Advanced React
- Zustand state management library
- Immer mutation helper
- animations using Framer Motion
Zustand state management library
useCounterStore
unlikeuseState
is global shared state- multiple usages of
useCounterStore
will use the same state
- multiple usages of
Persistance
Immer mutation helper
- Draft is proxy object tracking changes
- new value is returned without mutating original value