react-transition-group
react-transition-group copied to clipboard
Declaring `-enter-active` before `-enter` breaks transitions
What is the current behavior?
When mixing up the order of the -enter
and -enter-active
classes, transitions stop working properly.
/* Works */
.fade-enter .btn {}
.fade-enter-active .btn {}
/* Doesn't work */
.fade-enter-active .btn {}
.fade-enter .btn {}
What is the expected behavior?
I'm expecting the transitions to work regardless of class order, but that might just be my lack of knowledge about CSS transitions talking. I couldn't find anything in the docs explaining that the class order is important.
Could you provide a CodeSandbox demo reproducing the bug?
https://codesandbox.io/s/priceless-brook-66uzg?file=/src/styles.css
Thank you for your feedback. I'll consider adding a note for it.
experiencing this behavior with exit
and exit-active
classes as well.