web-client-ui
web-client-ui copied to clipboard
Add functions for emitting/listening events
Currently when we emit events, we simply call eventHub.emit(eventName, ...)
, which does not offer any type protection. Similarly, we call eventHub.on(eventName, callback)
which does not offer any type protection for the callback.
We should use functions to emit events and listen to them, so we get type protection. PanelEvent.OPEN
is being wired up with #2144, we should wire up all the other events as well.