Skip to content

Commit

Permalink
no transition logic
Browse files Browse the repository at this point in the history
  • Loading branch information
GantMan committed Aug 28, 2017
1 parent e600e22 commit 66d94e5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Navigation/AppNavigation.js
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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 },
Expand Down Expand Up @@ -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

0 comments on commit 66d94e5

Please sign in to comment.