Tug of War – Pushing and Pulling In JavaScript
summary
Argues that almost every line of JavaScript is either a push or a pull and demonstrates with an M&M demo why pull is synchronous and push can cause back pressure. Classifies primitives: functions and iterables (pull), callbacks and observables (push), promises (eager hybrid), async iterable (pull→push via async function), and signals* (push→pull, dual of async iterable). Shows how to combine them for controlled delivery, cites RxJS and TC39/W3C work, and explains subscribe/unsubscribe, for‑of, and next/hasNext mechanics.
AI-written summary · about
chapters (7)
- 0:00Introduction to push and pull
- 4:35Live demo of push vs pull
- 8:11Pull types in JavaScript
- 13:24Duality of iterables and observables
- 21:51Signals and their use cases
- 28:40When to use each pattern
- 32:35Key takeaways and conclusion
related talks
21mThinking About Your Code: Push vs Pull
55mJavaScript the Grumpy Parts
42mBeyond Promises: Async Patterns in JavaScript
44mJavaScript - From Birth to Closure
32mThe Evolution Of Asynchronous Javascript
12mThe Goodness of JavaScript
01h 04m5 architectures of asynchronous JavaScript
57mDown the Rabbit Hole: JavaScript in Wonderland
