Standard set of easy to use animations and declarative transitions for React Native
scale*
transforms.margin*
& padding*
when mixing generic and directional values.tintColor
.And:
transitionTo()
.Breaking Changes There's quite a few breaking changes although I expect most use cases will continue to work as before or slightly improved.
ease
(previously ease-in-out
).slide
, fade
, wobble
, lightSpeed
animations now use fixed values for translation instead of view size.duration
doesn't anymore.shake
animation.rotate
animation.transitionValue
prop.import * as Animatable from 'react-native-animatable'
transitionTo()
causing it to throw if not accompanied with a transition
prop.endState
object; this.refs.view.bounce(800).then((endState) => console.log(endState.finished ? 'bounce finished' : 'bounce cancelled'))
Other changes:
onAnimationBegin
prop.react-native
from peer dependencies, make sure your application has this as an explicit dependency.onAnimationEnd
prop.transition
now supports multiple values, just use an array instead of a string: transition={['fontSize', 'color']}
transitionValue
is deprecated, use style
prop instead: style={{fontSize: this.state.fontSize}}
or style={someCondition ? styles.whenCondition : styles.whenNot}
.StyleSheet.flatten
is now required for transition
, just upgrade to RN 0.15 if it complains.