Repeatedly call a function or async function with request animation frame.
import { repeatedAnimationFrame } from 'repeated-animation-frame'
const stop = repeatedAnimationFrame(() => {
// Animate something idk
// This function keeps on getting called
})
// If you want to stop
stop()
https://chocolateloverraj.github.io/repeated-animation-frame/
Generated using TypeDoc