Event-driven Programming 101
summary
Claims that replacing a continuous animation loop with event handlers (instead of a constant requestAnimationFrame-style render) stops needless 60fps rerenders, freeing CPU and keeping responsiveness the same while lowering frame churn. Explains the JavaScript event loop with timers moving to a callback queue, warns about blocking the loop and callback hell, and recommends debouncing, Promises/async, worker threads and bubbling custom events from the lowest DOM node.
AI-written summary · about
chapters (7)
- 0:00Introduction to event-driven programming
- 4:27What are events and triggers
- 9:47Event loop mechanism explained
- 12:39Advantages and disadvantages
- 14:31Avoiding event loop pitfalls
- 16:40Custom events best practices
- 18:24Combining paradigms in mature systems
related talks
01h 06mDesigning Applications with Functional Programming Constructs
01h 01mSpearheading the future of programming
52mBehavioral Programming: Aligning Code with How We Think -
34mClassic programming techniques in frontend
01h 01mOOP Is Dead, Long Live Data-oriented Design
38mSOLID JavaScript
15mEvents are the Wrong Abstraction for Your AI Agents
40mEverything Will Flow
