State Management · Senior · Question 72 of 75
When is an event bus better than shared state for cross-feature communication?
- ✓Correct answer: For one-off notifications ("order placed", "show toast") where listeners react but nobody needs the value later
- 2For data that components need to read at any time
- 3Never - events are always worse
Explanation
Storing transient events in state leads to flags that must be reset. Events decouple producers and consumers; persistent facts belong in state.