Interview frequency: …
Short answer
Local state belongs to a widget or a small feature, while shared state is needed by multiple parts or different screens and requires a clearer owner and scope.
Explanation
Start with the nearest owner of the state; do not lift a value that only one child needs. Make shared state explicit within the boundary of a feature, and keep temporary state such as the selected tab local unless there is a real reason to share it.
Common mistakes
- Putting all state in a global singleton.
- Treating every value inside a screen as app state.