Skip to content
zenui/react-hooks

useAnimationFrame

Run a callback on every animation frame with the time since the previous frame. Use it for canvas drawing, games and imperative animations where movement should be scaled by elapsed time.

Level
Intermediate
Since
v2.1.0
import {useAnimationFrame} from '@zenuilabs/react-hooks';
Loading demo_

More in Time & Motion