diff --git a/docs/animations.html b/docs/animations.html index 526c63a7636..8a853b4a2d6 100644 --- a/docs/animations.html +++ b/docs/animations.html @@ -362,54 +362,7 @@ make them customizable, React Native exposes a pop: CustomLeftToRightGesture, } });

Run this example

For further information about customizing scene transitions, read the -source.

AnimationExperimental (Deprecated) #

As the name would suggest, this was only ever an experimental API and it -is not recommended to use this on your apps. It has some rough edges -and is not under active development. It is built on top of CoreAnimation -explicit animations.

If you choose to use it anyways, here is what you need to know:

var AnimationExperimental = require('AnimationExperimental'); - -var App = React.createClass({ - componentDidMount() { - AnimationExperimental.startAnimation( - { - node: this._box, - duration: 1000, - easing: 'easeInOutBack', - property: 'scaleXY', - toValue: { x: 1, y: 1 }, - }, - ); - }, - - render() { - return ( - <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}> - <View ref={component => this._box = component} - style={{width: 200, height: 200, backgroundColor: 'red'}} /> - </View> - ) - }, -});

Now to demonstrate a known issue, and one of the reasons why it is -recommended not to use AnimationExperimental currently, let's try to -animate opacity from 1 to 0.5:

AnimationExperimental.startAnimation( - { - node: this._box, - duration: 1000, - easing: 'easeInOutBack', - property: 'opacity', - fromValue: 1, - toValue: 0.5, - }, -);

Pop (Unsupported, not recommended) #

Facebook Pop "supports spring and -decay dynamic animations, making it useful for building realistic, -physics-based interactions."

This is not officially supported or recommended because the direction is -to move towards JavaScript-driven animations, but if you must use it, -you can find the code to integrate with React Native -here. -Please do not open questions specific to Pop on the React Native issues, -StackOverflow is a better place to answer those questions as it is not -considered to be part of the core.

Next →