Zarządzanie stanem · Junior · Pytanie 33 z 75
Czym jest Zustand?
- ✓Poprawna odpowiedź: Małym menedżerem stanu opartym na hookach, bez providerów i boilerplate'u
- 2Cache'em serwerowym dla odpowiedzi API
- 3Oficjalnym hookiem Reacta do stanu globalnego
Wyjaśnienie
const useBear = create(set => ({ bears: 0, add: () => set(s => ({ bears: s.bears + 1 })) })) - i każdy komponent wywołuje useBear(...). <Provider> nie jest potrzebny: store żyje w module.