Skip to content

Håkon Underbakke

[hɔ:kʊn] – I ❤ Web Design

Tag Archives: snippet

Typesafe Custom Events

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 […]

Posted byimpedans06/07/202310/07/2023Posted inArticle, TipsTags: snippetLeave a comment on Typesafe Custom Events
Håkon Underbakke, Proudly powered by WordPress.