What does transitionEnterTimeout/transitionLeaveTimeout actually do in React? What does transitionEnterTimeout/transitionLeaveTimeout actually do in React? reactjs reactjs

What does transitionEnterTimeout/transitionLeaveTimeout actually do in React?


They indicate how long the associated CSS transitions take to complete. You should set these values to the same values you use in your CSS classes for the transition attribute.

ReactCSSTransitionGroup then uses this to determine when it should consider the elements added and removed so it can take the correct action. It used to do this by listening for callbacks, however, this turned out to be really unreliable since there were lots of instances where the callbacks were never called. This would cause elements to never be removed after the transition ended, for example.