10 Manage Storefront Event Notification
The PubSub
library allows you to manage your storefront notifications.
Commerce includes two mechanisms for storefront event notification:
- The
PubSub
library provides a way for code to publish and subscribe to a set of “global” messages. That is, any code in the application can publish messages about an event and any code can listen for those messages. - The
event-dispatcher
module provides the ability to listen for events triggered by a specific instance of an object.