DEV Community

Discussion on: How to Stop requestAnimationFrame in Vuejs / Javascript

 
elliott_regan profile image
Elliott Regan • Edited

The benefit could be when this.fancyFunctionHere kicks off a recursive loop, like an animation.

fancyFunctionHere() {
    this.id = requestAnimationFrame(this.fancyFunctionHere);
}