What Tamagotchis can teach you about generators
summary
Built a functioning web Tamagotchi that struggled when many animations overlapped, tried promises and hit “venerable hell” plus inability to cancel, then rewrites animations as generators, uses a coroutine to yield promises and resume only when timeouts resolve, and delegates nested animations with yield and yield star. The result: idle loops that can be interrupted immediately, animations cancel cleanly, and the demo shows feeding events run without waiting for the idle to finish.
AI-written summary · about
chapters (4)
related talks
25mWhat Tamagotchis Can Teach You About ES6 Generators
23mWhat Tamagotchis Can Teach You About ES6 Generators
36mThe Power of JS Generators
15mI Yield for Generators
21mFurther Adventures of the Event Loop
31mPromises and Generators: control flow utopia
27mBreaking Down JavaScript Complexities With Generative Art
51mThe Miracle of Generators
