UNPKG

framer-motion

Version:

A simple and powerful JavaScript animation library

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