Subscribe and listen to topics. Useful to handle application-wide state changes
on(topic, callbackFn)
- Subscribe to a topic. Returns a function that you can call to unsubscribe fromoff(topic, callbackFn)
- Unsubscribe to a topicpublish(topic, data)
- send a message to every subscriber on a topicreset()
- Clear all subscriptions