react-animate-on-change
Animate your react components on props or state changes, in contrast to entries added/removed from arrays.
Install
Usage
The example above will (roughly) render to:
On enter or changes in props.diff
or props.score
:
On animation end:
Also, see the example folder.
Props
baseClassName {string}
: Base class name that be added to the component.
animationClassName {string}
: Animation class name. Added when animate == true
. Removed when the event animationend
is triggered.
animate {bool}
: Whether component should animate.
customTag {string}
: HTML tag of the component.
onAnimationEnd {() => void)}
: Callback which is called when animation ends.
Develop
Add tests in test.js and hack away.
Known issues
- The browser must support CSS3 animations.