Open edoroshenko opened 8 years ago
Good point, although not sure what the ideal behaviour would be
I unfortunately don't think it'd be possible to actually delay the componentDidMount
, since the mounting happens outside TransitionGroupPlus's control
Doing something like adding opacity: 0
to the component seems potentially heavy-handed?
Input welcome
Let's say, we have two components (c1, c2) to replace with animation from c1 to c2. Let's say we replace them in
out-in
mode.Then their hooks will be invoked in the following order:
componentDidMount
c2componentWillLeave
c1componentDidLeave
c1componentWillEnter
c2I put here only hooks that I use in my app, but it's enough to get the idea.
It can be easily got round by hiding c2 element's node in
componentDidMount
hook and showing back incomponentWillEnter
, but it's desirable to be fixed to make the solution solid.