react-interruptible-transition-group

an alternative to ReactTransitionGroup with more CSS-like behavior when components re-enter before fully leaving or vice versa

Stars
5
Committers
1

InterruptibleTransitionGroup

(not deployed to npm yet)

var InterruptibleTransitionGroup = require('react-interruptible-transition-group');

An alternative to ReactTransitionGroup where appearing, entering, and leaving transitions get interrupted immediately if a child isremoved/re-added before fully entering/leaving. This behaves more like CSS transitions than ReactTransitionGroup.

The API looks the same but unlike ReactTransitionGroup: componentDidAppear, componentDidEnter, and componentDidLeave are not guaranteed to be called; they are only called when a component fully appears/enters/leaves. For example, if a component is removed while it's entering, the sequence will look like:

componentWillEnter
componentWillLeave
componentDidLeave

Requirements

React >= 0.13.3 is of course required, though I've chosen not to make it a peer dependency.

Related Projects