Design Patterns · Senior · Question 41 of 75
What are domain events on the frontend, and why are they useful?
- ✓Correct answer: Messages about domain facts for independent modules
- 2DOM events like
clickandinputon form elements - 3Events the browser fires when the domain changes
Explanation
The checkout module publishes an event, and analytics, the cart and notifications react without being directly coupled. It's Pub/Sub at the domain level; it's important to maintain an event catalog and type the payloads.