State Management · Junior · Question 38 of 75
How does server state differ from client (UI) state?
- ✓Correct answer: It lives on the server, is shared and can become stale - the UI holds a cached copy
- 2It's state stored in server components only
- 3It's state that is never shown in the UI
Explanation
Server data (a list of orders) can change without the user's knowledge, so it needs caching, refetching and invalidation. UI state (whether a modal is open) belongs entirely to the client. Mixing them in one store leads to manual sync code.