Merge pull request #3491 from bobbyrenwick/transition-group-appear-docs

adding docs for componentWillAppear and componentDidAppear
This commit is contained in:
Paul O’Shannessy 2015-03-24 14:05:11 -07:00
commit 21bb7582c0
1 changed files with 8 additions and 0 deletions

View File

@ -143,6 +143,14 @@ You can disable animating `enter` or `leave` animations if you want. For example
`ReactTransitionGroup` is the basis for animations. It is accessible as `React.addons.TransitionGroup`. When children are declaratively added or removed from it (as in the example above) special lifecycle hooks are called on them.
### `componentWillAppear(callback)`
This is called at the same time as `componentDidMount()` for components that are initially mounted in a `TransitionGroup`. It will block other animations from occurring until `callback` is called. It is only called on the initial render of a `TransitionGroup`.
### `componentDidAppear()`
This is called after the `callback` function that was passed to `componentWillAppear` is called.
### `componentWillEnter(callback)`
This is called at the same time as `componentDidMount()` for components added to an existing `TransitionGroup`. It will block other animations from occurring until `callback` is called. It will not be called on the initial render of a `TransitionGroup`.