react-transition-group
react-transition-group copied to clipboard
SwitchTransition infinite loop between exit and enter state
What is the current behavior?
As soon as I insert a <SwitchTransition> into a <CSSTransition> component, once it is activated, an infinite loop is created between classes named enter and exit. It jumps back and forth between the two classes without any intermediate stages.
What is the expected behavior?
No infinite loop between enter and exit
Could you provide a CodeSandbox demo reproducing the bug?
@floxrot you have to provide key prop to the CssTransition to prevent infinite loop for your transitions.
key ={isSuccessful? "trueText": "notTrueText"}