Design Patterns · Senior · Question 6 of 75
What is Event Sourcing?
- ✓Correct answer: State is a log of events, and the current value is derived from it
- 2Subscribing to DOM events via a single handler on
document - 3Generating analytics events on every user click
Explanation
Instead of "balance = 100", events like "deposited 150" and "withdrew 50" are stored. This gives a full audit trail and the ability to replay and recompute state. Redux with time travel is the frontend counterpart: state = a fold of actions.