useNextFrameTicked
Hook used to delay something in the next frame tick.
Usage
useNextFrameTicked
returns false
at render, then true
after a frame.
import { useNextFrameTicked } from "swash/motion/Animation";
function Example() {
const ticked = useNextFrameTicked();
}
Skip
Skip it by passing skip
option.
import { useNextFrameTicked } from "swash/motion/Animation";
function Example() {
const ticked = useNextFrameTicked({ skip: true }); // Hook is not executed until skip is `false`
}