useTime
useTime
returns a motion value that updates once per frame with the duration, in milliseconds, since it was first created.
This is especially useful in generating perpetual animations.
Usage
Import from Motion:
When called, useTime
will create a new motion value. This value will update every frame with the time since its creation.
You can use this either directly or by composing with other motion value hooks.
Motion is open source. Sponsorships keep the project sustainable.
Every sponsor receives access to our private Discord, and an exclusive mobile and desktop wallpaper pack.