Different ways to set "global" state in React. Usage of a basic counter example (add, substract, add x amount).
The goal is to use the same pattern (visual and logical) to achieve the same results with the API given by each library.
Current state managers:
- Context API (Hooks)
- Zustand (Unidirectional)
- Redux Toolkit (Unidirectional)
- Jotai (Atomic)
- Valtio (Bidirectional)