Special lifecycle hooks are not being called when using `ReactCSSTransitionGroup`
See original GitHub issueWhen using <ReactCSSTransitionGroup>
on a component, the special lifecycle hooks are not being called.
I think it would be useful and nice to know when a transition occurs and which state the transition owns.
I guess ComponentWillEnter
, ComponentDidEnter
and other special methods were meant to expose those states, but I cannot make it work, unless I use <ReactTransitionGroup>
, but this way css classes are not being applied during the transition.
Documentation here (http://facebook.github.io/react/docs/animation.html) states:
“ReactTransitionGroup is the basis for animations. When children are declaratively added or removed from it (as in the example above) special lifecycle hooks are called on them.”
“The example above” is using <ReactCSSTransitionGroup>
, so one would expect to have those special hooks being called, but it seems they don’t.
Issue Analytics
- State:
- Created 9 years ago
- Comments:17 (3 by maintainers)
@gaearon If the plan is still to deprecate the addons, would it be possible to add a deprecation notice to the React docs? The page for
reactCSSTransitionGroup
still comes up very high in search results and there’s no indication that the addon will be deprecated. I just happened to stumble on this issue while trying to getreactCSSTransitionGroup
to work for me.Adding that deprecation notice might save some people some time in the future.
This is the official repo for TransitionGroup now: https://github.com/reactjs/react-transition-group