Events As A Communication Pattern
summary
Claims that React components communicate reliably with browser native custom events instead of extra libraries, implemented as sendEvent & useActOnEvent using the browser CustomEvent via window and a global listener. Demonstrates a filters infrastructure and a table row click example that work and simplify coupling. Surprising pitfall: parent state can finish before child updates and force a remount; fixes are namespaced IDs and sending events after state changes via event queue with useRef and useEffect. No external state libs required.
AI-written summary · about
chapters (8)
- 0:00Agenda
- 1:41Framework Mindset
- 1:58Using Events
- 2:27Send Events
- 3:16Listen For Events
- 4:02Example
- 5:16Issues
- 11:38Benefits
related talks
49mEvent-Sourcing your React-Redux applications
15mReact X Web Components: How it is and how it could be
35mAdvanced patterns in building React Components
25mReact x Web Components : How It Is and How It Could Be
01h 04mWhat makes React different?
44mWriting good components
19mThe Eventful API: Rethinking Frontend State from the Server Down
23mHow to Roll Your React Components Like a Good Inside-Out Sushi
