1.0.3 • Published 4 years ago
@jwdinker/use-animation-frame v1.0.3
useAnimationFrame
Usage
useAnimationFrame will run on every frame unless the toggable option is set to true
.
import useAnimationFrame from "@jwdinker/use-animation-frame";
function MyComponent() {
const [start, stop] = useAnimationFrame({
onStart: () => {},
onFrame: () => {},
onCancel: () => {},
delay: 0,
toggable: false
});
return <div />;
}