facebook/react — pull request #2511 by appsforartists (2014-11-13 02:05:14+00:00)
Title: Add componentWillEnterOnMount to ReactTransitionGroup children

Presently, ReactTransitionGroup will trigger `enter` and `leave` states for children that are modified while the `TransitionGroup` is active, but doesn't provide any hooks for similar animations at mount time.

This is problematic for implementing transitions [like this](https://material-design.storage.googleapis.com/publish/v_1/quantumexternal/0B08MbvYZK1iNTGRLb2Zud2RUNFE/animation-meaningfultransitions-hierarchicaltiming-4do_large_xhdpi.webm) while also making sure your nodes are present at mount-time for SEO purposes.

@leebyron suggested adding a separate state to differentiate nodes that are present at mount-time from ones that are added later. Obviously, `componentWillEnter` already had a well-defined behavior, so to stay as consistent as possible without interfering with it, I've used the name `componentWillEnterOnMount` for the callback. The implementation is identical to `componentWillEnter`, except for the different state and callback names. (There's probably room to refactor them in the future, but this works for a proof-of-concept.)

I'm also happy to add `transitionMount` to `CSSTransitionGroupChild`.

Obviously, docs and tests will need to come. I'm opening this now to anchor the conversation.