React Zustand Tutorial - 8. setState, getState and separate actions from the store

Опубликовано: 25 Октябрь 2024
на канале: Conny Gu
2,552
79

A deep dive tutorial series on React,js Zustand - a State Management Library.

This video is about how to access states with getState() and update states with setState(). Both can be done from any other component. Furthermore, separating actions from the store improves the structure and readability of your code.

react zustand documentation:
https://docs.pmnd.rs/zustand/

practice with no store actions:
https://docs.pmnd.rs/zustand/guides/p...

code:
https://github.com/niftybytes4u/react...

00:00 Intro getState and setState
02:25 setState
04:14 getState
06:13 getState use-case
08:26 Separate actions from the store
13:37 Outro about next video