UNPKG
@kcirtaptrick/framer-motion
Version:
latest (6.2.9)
6.2.10
6.2.9
A simple and powerful React animation library
github.com/framer/motion
framer/motion
@kcirtaptrick/framer-motion
/
dist
/
es
/
value
/
use-time.mjs
11 lines
(8 loc)
•
284 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
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 };