UNPKG

framer-motion

Version:

A simple and powerful React animation library

11 lines (8 loc) 284 B
import { useAnimationFrame } from '../utils/use-animation-frame.mjs'; import { useMotionValue } from './use-motion-value.mjs'; function useTime() { var time = useMotionValue(0); useAnimationFrame(function (t) { return time.set(t); }); return time; } export { useTime };