Component State vs Server State
How to decide what belongs in local state and what should be managed as remote state.
Component State vs Server State
How to decide what belongs in local state and what should be managed as remote state.
Component state is usually for short-lived UI concerns such as toggles, forms in progress, and local interaction state.
Server state represents remote data that needs freshness, cache policy, and synchronization across views.
Practical guidance
- Keep ephemeral UI concerns local.
- Keep shared remote data in a query cache.
- Avoid mixing server freshness logic with UI-only state.
