react-spring
react-spring copied to clipboard
[bug]: Latest version of react-spring useTransition re-renders multiple times
Which react-spring target are you using?
- [ ]
@react-spring/web - [ ]
@react-spring/three - [x]
@react-spring/native - [ ]
@react-spring/konva - [ ]
@react-spring/zdog
What version of react-spring are you using?
9.4.5
What's Wrong?
When animating with useTransition, it appears that when I do the action that activates the animation, it re-renders multiple times. I have searched previous isssues on github and have seen many with this problem but not sure what exactly the solution is. Could I get some help as to why this is happening?
To Reproduce
(Look below at codesandbox link)
This is what the issue looks like Example
Expected Behaviour
I want it to behave like tihs
Link to repo
Please provide a code reproduction of the your issue.
For guidance on how to do so see – https://stackoverflow.com/help/minimal-reproducible-example
I encourage you to use codesandbox.
Please provide a code reproduction of the your issue.
For guidance on how to do so see – https://stackoverflow.com/help/minimal-reproducible-example
I encourage you to use codesandbox.
Thanks, I have attached the codesandbox to the original issue
I've checked your sandbox, i'll be honest it's still way too complicated. I think you need to boil it down to the pure issue you're facing all this hover and non-hover is confusing, it could be that or regular CSS thats the issue.
Considering no one else has reported this issue, and it seems you're using it in a regular way, I think I really need to see the simplest form of the issue to take this further.
Thanks for trying. Not sure what the simplest form of the issue is but I think I might go for on click rather than hover.
Closing due to inactivity