[bug]: animation broken on v10
Which react-spring target are you using?
- [x]
@react-spring/web - [ ]
@react-spring/three - [ ]
@react-spring/native - [ ]
@react-spring/konva - [ ]
@react-spring/zdog
What version of react-spring are you using?
10.0.1
What's Wrong?
I have an animation for a dropdown container that grows it and fades it in. Through version 9.7.5 and even an older version of the beta this animation worked. On version 10 this animation no longer fires. Adding an onChange shows its never fired on v10. I have other animations that work with v10 but I think maybe scale may be the culprit here
To Reproduce
You can reproduce the bug by running the project at https://github.com/alexkahndev/react-spring-v10-bug. You will notice that no dropdown appears and no animation is run.
Expected Behaviour
https://github.com/user-attachments/assets/6ee5b04f-f1d6-4a4c-ae9c-db2b9123fb13
Link to repo
https://github.com/alexkahndev/react-spring-v10-bug
This might be related to the issue I'm also seeing with the imperative API: https://github.com/pmndrs/react-spring/issues/2377
What happens if you downgrade from 10.0.1 back to 10.0.0, can you still see the issue? For me, it was the patch version bump that broke the imperative API for me.
For my issue even on version 10.0.0 it does not animate. The last working version for this animation is 9.7.5
+1
Same for me, the last working version is 9.7.5
With 10.0.0 and greater the imperative API doesn't work anymore
When adding React 19 support, the updates in both useSprings (which is internally used for useSpring) were replaced with a ref. This seems to cause fuckery all over the place.
Here is the specific change: https://github.com/pmndrs/react-spring/pull/2368/files#diff-e1288b0efcce202f0575295aec86c6f33c5d81adac9751131dc5d2b08e40e73a
packages/core/src/hooks/useSprings.ts:131
@dagatsoin since you introduced the change: what was the reason - and could we rollback this?