-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
67 lines (60 loc) · 1.93 KB
/
index.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/** @format */
import { Navigation } from "react-native-navigation";
import {Provider} from 'react-redux'
import App from './App';
import SharePlace from './src/screens/SharePlace'
import FindPlace from './src/screens/FindPlace'
import configuerStore from './store/configureStore'
const store = configuerStore();
Navigation.registerComponentWithRedux(`navigation.playground.WelcomeScreen`, () => App, Provider, store);
Navigation.registerComponentWithRedux(`navigation.playground.s1`, () => SharePlace, Provider, store);
Navigation.registerComponentWithRedux(`navigation.playground.s2`, () => FindPlace, Provider, store);
Navigation.events().registerAppLaunchedListener(() => {
/*Navigation.setRoot({
root: {
component: {
name: "navigation.playground.WelcomeScreen"
}
}
});*/
Navigation.setRoot({
root: {
bottomTabs: {
children: [{
stack: {
children: [{
component: {
name: 'navigation.playground.s1',
passProps: {
text: 'This is tab 1'
}
}
}],
options: {
bottomTab: {
text: 'Tab 1',
icon: require('./images/camera.png'),
testID: 'FIRST_TAB_BAR_BUTTON'
}
}
}
},
{
component: {
name: 'navigation.playground.s2',
passProps: {
text: 'This is tab 2'
},
options: {
bottomTab: {
text: 'Tab 2',
icon: require('./images/camera.png'),
testID: 'SECOND_TAB_BAR_BUTTON'
}
}
}
}]
}
}
});
});