You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug]: Spring Config function not called when using Imperative API #2186
and called animation.start() to trigger animations, the component did not re-render at all. It seemed that I could use the Imperative API without useSpringRef(), and the documentation confused me.
Same here. I am really confused that .set() does not work on SpringRef. I have no idea if it is designed to be in this way but seems it shouldn't be according to the documentation.
Activity
dragonman225 commentedon Aug 16, 2023
I revisited the issue and found a way to make the config work—the config must be set via a
SpringRef's.start(), like thisBy the way, setting the config via a
SpringRef's.set()also doesn't work.Furthermore, looking more into the comparison of Imperative API v.s. stateful component example, I noticed that the
StateComponentre-renders because it uses React's state to trigger animation, not because the use ofuseSpring.Going back to my code, inspecting it, I realized that if I used
useSpringlike this:and called
animation.start()to trigger animations, the component did not re-render at all. It seemed that I could use the Imperative API withoutuseSpringRef(), and the documentation confused me.Docker-J commentedon Nov 22, 2023
Same here. I am really confused that
.set()does not work onSpringRef. I have no idea if it is designed to be in this way but seems it shouldn't be according to the documentation.