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
Change the react-spring version on the left to see for yourself.
I'm guessing that this is not a bug, but rather a change to how useTransition works. I couldn't find anything in the docs on this - please enlighten me if I can write my code in a better way.
The text was updated successfully, but these errors were encountered:
My switch to v9 is mostly an attempt to get testing working - I'm trying to figure out a way to instantly complete an animation so I can test appropriate DOM additions/removals using React Testing Library. Do you have any suggestions regarding this?
🐛 Bug Report
If I keep the same key, the value of the item for
useTransition
no longer gets updated.This may be the expected behaviour, but it did not work this way in v8, and I am wondering how I can get around this issue.
To Reproduce (CodeSandbox below)
I have code like the following:
I do a state update like so:
And later a state update like so:
And finally a state update like so:
Expected behavior
[1]
to fade in.[1]
to[2]
- no fade.[2]
to fade out - it should not change to[]
.This works perfectly in 8.0.27, but breaks in any of the major version 9s.
Link to repo
https://codesandbox.io/s/awesome-feistel-pmtrr
Change the react-spring version on the left to see for yourself.
I'm guessing that this is not a bug, but rather a change to how
useTransition
works. I couldn't find anything in the docs on this - please enlighten me if I can write my code in a better way.The text was updated successfully, but these errors were encountered: