A
A
Alexander2021-09-27 17:09:26
css
Alexander, 2021-09-27 17:09:26

How to remove react-transition-group animation delay on mount?

Can you please tell me how to remove the react-transition-group animation delay when mounting?
I have a dropdown component that should have unmountOnExit, but there is an animation delay on entering when unmountOnExit is used, if not doing unmountOnExit, and set the animation values ​​to

const transitionStyles: any = {
  entering: { transform: 'translateY(0%)' },
  entered: { transform: 'translateY(0%)' },
  exiting: { transform: 'translateY(-100%)' },
  exited: { transform: 'translateY(-100%)' },
}
, then everything works fine. I first encountered an unexpected delay in the react-transition-group, in theory everything should work as it should.
Here is the source code with animation delay. I will be very grateful for the help
Link

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question