react-transition-group icon indicating copy to clipboard operation
react-transition-group copied to clipboard

Declaring `-enter-active` before `-enter` breaks transitions

Open sidola opened this issue 3 years ago • 2 comments

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

sidola avatar Jun 19 '21 17:06 sidola

Thank you for your feedback. I'll consider adding a note for it.

koba04 avatar Jun 21 '21 09:06 koba04

experiencing this behavior with exit and exit-active classes as well.

unicornware avatar Dec 26 '23 22:12 unicornware