-
TIL: In observablehq, you can use
invalidation.then(() => { // 🧹 clean up code })to run any code right before a cell gets re-evaluated (or invalidated)! It's very handy in clearing timers, requestAnimationFrame,...
invalidation.then(() => { // 🧹 clean up code }) to run any code right before a cell gets re-evaluated (or invalidated)! It's very handy in clearing timers, requestAnimationFrame,...