Types of State:
- Local State
- e.g. React
useState
Hook
- e.g. React
- Shared State
- e.g. React Context, Redux
- Remote State (i.e. API)
- e.g. React Context, Redux
Shared State Options:
redux
+redux-observable
+rxjs
+react-redux
- Drawbacks
- Boilerplate
- Drawbacks
- React Context
- Drawbacks
- "Provider Hell"
- Unintentional Re-Renders
- Drawbacks
constate
/recoil
/react-tracked
Remote State Options:
redux
+redux-observable
+rxjs
+react-redux
- Drawbacks
- Boilerplate
- Drawbacks
- React Context
- Drawbacks
- "Provider Hell"
- Unintentional Re-Renders
- Drawbacks
constate
/recoil
/react-tracked
/@tanstack/react-query
- Local State: React
useState
Hook - Shared State:
recoil
- Remote State:
@tanstack/react-query