-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.js
45 lines (39 loc) · 1.07 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// @flow
import React, { Component } from 'react';
import { UIManager } from 'react-native';
import { StackNavigator } from 'react-navigation';
// Hack to support horizontal navigation animation on Android.
import CardStackStyleInterpolator from 'react-navigation/src/views/CardStack/CardStackStyleInterpolator';
import Home from './Home';
import ExampleCalculator from './ExampleCalculator';
import ExampleTouch from './ExampleTouch';
/**
* Enabled Android Layout Animation
*/
UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
const RootStack = StackNavigator(
{
Home: {
screen: Home,
},
ExampleCalculator: {
screen: ExampleCalculator,
},
ExampleTouch: {
screen: ExampleTouch,
},
},
{
initialRouteName: 'Home',
transitionConfig: () => ({
screenInterpolator: sceneProps => {
return CardStackStyleInterpolator.forHorizontal(sceneProps);
},
}),
}
);
export default class App extends Component<void, void> {
render() {
return <RootStack />;
}
}