State Management · Senior · Question 66 of 75
How should independently deployed micro-frontends share state like the current user?
- ✓Correct answer: Through a small explicit contract - events (
CustomEvent/message bus), URL or a shared service - not by reaching into each other's stores - 2By importing each other's Redux stores directly
- 3Through global variables written by every app
Explanation
Coupling to another team's internal store breaks on their next refactor. Keep shared state minimal and versioned like any API.