-
Is it possible to use the spring mechanism of react-spring independent of react? I currently use react-spring in the usual way to animate react components on my page, but now I need to do spring animations on values that are used in a canvas as well. For the time being, I just use useSpring in a react component that renders null, but I’d prefer to be able to get a spring without needing to associate it with an empty react component. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! |
Beta Was this translation helpful? Give feedback.
Hi!
I believe you could use this
SpringValue
class (documented here https://aleclarson.github.io/react-spring/v9/#The-SpringValue-class). TheSpringValue
class is whatreact-spring
uses "under the hood" to power the animations.