State Management · Senior · Question 5 of 75
Which classification of state helps pick tools in a large app?
- ✓Correct answer: Server cache, URL state, form state, local UI state and global client state
- 2Synchronous and asynchronous state only
- 3Primitive and object state
Explanation
Each kind has a natural home: server cache - TanStack Query/RTK Query/SWR/loaders; URL - the router; forms - local state or a form library; UI - useState; truly global client state - Context or a store. Putting everything into one store makes it the bottleneck.