Browse Source

Add note about higher/lower-level transition APIs

main
Ben Alpert 10 years ago
parent
commit
0737160d6f
  1. 4
      docs/09.1-animation.md

4
docs/09.1-animation.md

@ -88,6 +88,10 @@ You'll notice that when you try to remove an item `ReactCSSTransitionGroup` keep
You can disable animating `enter` or `leave` animations if you want. For example, sometimes you may want an `enter` animation and no `leave` animation, but `ReactCSSTransitionGroup` waits for an animation to complete before removing your DOM node. You can add `transitionEnter={false}` or `transitionLeave={false}` props to `ReactCSSTransitionGroup` to disable these animations.
> Note:
>
> When using `ReactCSSTransitionGroup`, there's no way for your components to be notified when a transition has ended or to perform any more complex logic around animation. If you want more fine-grained control, you can use the lower-level `ReactTransitionGroup` API which provides the hooks you need to do custom transitions.
## Low-level API: `ReactTransitionGroup`
`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.

Loading…
Cancel
Save