Add useAnimationState
hook
#134
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
It's currently not possible to use animation updates inside a component. You need to workaround it using the
useExposeAnimation
anduseExposedAnimation
hooks.Solution 1
Create a hook that uses the workaround solution.
Solution 2
Create an animation hook that uses state to store the animation instance.
If we use this approach we also need to update the
useExposeAnimation
hook so that it acceptsRefObjects<gsap.core.Animation>
andgsap.core.Animation
.The text was updated successfully, but these errors were encountered: