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

Replacing item causes animation jank

Open use opened this issue 3 years ago • 1 comments

What is the current behavior?

Replacing one item with another (exit: 0) briefly causes them to both exist, causing animation jank.

This comes up in situations where I want to animate one item out and replace it with another. For example: Swapping out a title bar, or a submenu.

What is the expected behavior?

Two items which logically shouldn't exist at the same time shouldn't be visible at the same time.

Could you provide a CodeSandbox demo reproducing the bug?

https://codesandbox.io/s/autumn-hooks-e2qpr

Click the button a couple times and you should see the "blip" where the two items stack vertically, causing the button to appear lower momentarily.

If I'm doing something wrong, please let me know.

Thank you for this wonderful and helpful library!

use avatar Jan 11 '22 16:01 use

same problem

Echo-Lynn avatar Jan 20 '22 08:01 Echo-Lynn