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
Currently, I am seeing no updating of state. When I am trying to update a useState variable - the variable just fails to update. It could possibly be because using SwitchTransition component somehow changes the block scope. Not sure how, and I could be wrong but that's what I am thinking.
What is the expected behavior?
Expected behavior - Change the useState variable as I want it to.
You will see, if you comment out the SwitchTransition component from App.js file - everything starts working as expected. The entry animations will play when you press Next. The useState variable updates properly.
But as soon as you insert SwitchTransition back - the component stops updating.
Bonus problem/guidance needed - How can I make the exit animation work?
Could you provide a CodeSandbox demo reproducing the bug?
Currently, I am seeing no updating of state. When I am trying to update a
useState
variable - the variable just fails to update. It could possibly be because usingSwitchTransition
component somehow changes the block scope. Not sure how, and I could be wrong but that's what I am thinking.Expected behavior - Change the
useState
variable as I want it to.You will see, if you comment out the
SwitchTransition
component from App.js file - everything starts working as expected. The entry animations will play when you press Next. TheuseState
variable updates properly.But as soon as you insert
SwitchTransition
back - the component stops updating.Bonus problem/guidance needed - How can I make the exit animation work?
Why, yes. Absolutely. Codesandbox link here
The text was updated successfully, but these errors were encountered: