Been busting my head against this for a week now. I'm using react-spring to create a transition animation between pages. Those pages are defined by a switch case that is called within the render of a React Component.
I made a quick oversimplifeid sandbox with the odd behaviour:
https://codesandbox.io/s/50y5kkljz4
Most of this code is a simulation of my more complex stack. Looking for any suggestions and what i'm missing.
Is this a bug from react-spring?
Am I doing something that a no no in React?
Is it even possible to animate between (switch) cases?
Things to try:
- [Line 71] Comment out keys from the Transition Component. See what result.
- [Line 74] Comment out the leave prop from the Transition Component. See result.
Full API reference for react-spring
Thanks in advance!