logoalt Hacker News

bodantogat04/01/20251 replyview on HN

Incredibly useful, especially with React, where the Context API, state lifting, and prop drilling often feel clunky. That said, it can lead to messy code if not carefully managed.


Replies

jilles04/01/2025

Bingo! Having tons of `CustomEvents` with arbitrary handlers gets unwieldy. One way we "solved" this is by only allowing custom events in a `events.ts` file and document them pretty extensively.