diff --git a/src/views/Transitioner.js b/src/views/Transitioner.js index 0ee5d72..b7ad1f2 100644 --- a/src/views/Transitioner.js +++ b/src/views/Transitioner.js @@ -1,9 +1,18 @@ import React from 'react'; -import { Animated, Easing, StyleSheet, View } from 'react-native'; +import { + Animated, + NativeModules, + Easing, + StyleSheet, + View, +} from 'react-native'; import invariant from '../utils/invariant'; import NavigationScenesReducer from './ScenesReducer'; +const NativeAnimatedModule = + NativeModules && NativeModules.NativeAnimatedModule; + // Used for all animations unless overriden const DefaultTransitionSpec = { duration: 250, @@ -38,6 +47,10 @@ class Transitioner extends React.Component { ), }; + if (NativeAnimatedModule) { + this.state.position.__makeNative(); + } + this._prevTransitionProps = null; this._transitionProps = buildTransitionProps(props, this.state); this._isMounted = false;