Frontend: Client State vs Server State
A teammate stores every API response in a single global Redux store and copies it into local component state. Critique the approach.
Technical Reference & Key Concepts
The Challenge: State Management Critique
Your teammate says: 'I put all API data in Redux and also copy it into useState in the component, so we always have it.' The app has caching bugs, duplicate fetches, and stale data.
Core questions to address:
- What is wrong with copying server data into both a global store and local state?
- How would you classify state (server vs client) and where should each live?
- What concrete refactor would you propose?