An onTransitionEnd
event for components which is normalized across all browsers supporting transitions (and fake it for those that don't using setTimeout
). Currently react uses ReactTransitionEvents
internally for the TransitionGroup
. However this is not useful in cases where you are not adding/removing a view.
:+1: to this. Even as a plugin would be helpful.
:+1: currently using this workaround:
componentDidUpdate: function() {
this.getDOMNode().addEventListener('transitionend', this.onTransitionEnd, false);
}
Would prefer to do:
<MyComponent onTransitionEnd={this.onTransitionEnd} />
+1
FYI, "faking it" as @shilpan mentioned may be harder than it seems. Apparently the native transitionEnd
event does not fire if the transition ends off-screen (in my case, the element is display:none
). So it may be better to have React just handle the native behavior for supported browsers, and let us handle any custom code for old browsers.
Any update regarding this feature?
+1
:+1:
:+1:
:+1: that would amazing ;)
:+1:
+1
+1
This was fixed by #6005 & be in v15.
Most helpful comment
This was fixed by #6005 & be in v15.