Here’s a useful abstraction on top of custom events that let you more easily set up typesafe channels to communicate between. This can be used in React like a hook: It’s worth noting that the events collected in the hook are cleared when the component is unmounted, and it only start listening once the component […]