From 66d94e53e5d36670f6f93a53c0a5e58fa7dba721 Mon Sep 17 00:00:00 2001 From: Gant Laborde Date: Sun, 27 Aug 2017 19:30:47 -0500 Subject: [PATCH] no transition logic --- Navigation/AppNavigation.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Navigation/AppNavigation.js b/Navigation/AppNavigation.js index cdbad9d..05f7085 100644 --- a/Navigation/AppNavigation.js +++ b/Navigation/AppNavigation.js @@ -1,5 +1,5 @@ import React from 'react' -import { Text } from 'react-native' +import { Text, Animated, Easing } from 'react-native' import { StackNavigator, DrawerNavigator } from 'react-navigation' import LoginScreen from '../Containers/LoginScreen' import SignupScreen from '../Containers/SignupScreen' @@ -8,6 +8,15 @@ import Screen1 from '../Containers/Screen1' import Screen2 from '../Containers/Screen2' import Screen3 from '../Containers/Screen3' +// https://github.com/react-community/react-navigation/issues/1254 +const noTransitionConfig = () => ({ + transitionSpec: { + duration: 0, + timing: Animated.timing, + easing: Easing.step0 + } +}) + // drawer stack const DrawerStack = DrawerNavigator({ screen1: { screen: Screen1 }, @@ -50,7 +59,8 @@ const PrimaryNav = StackNavigator({ // Default config for all screens headerMode: 'none', title: 'Main', - initialRouteName: 'loginStack' + initialRouteName: 'loginStack', + transitionConfig: noTransitionConfig }) export default PrimaryNav