react: Special lifecycle hooks are not being called when using `ReactCSSTransitionGroup`
When 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.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 17 (1 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
reactCSSTransitionGroupstill 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 getreactCSSTransitionGroupto work for me.Adding that deprecation notice might save some people some time in the future.