forked from InterruptedLobster/ARO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ios.js
42 lines (38 loc) · 1.15 KB
/
index.ios.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
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import rootReducer from './app/reducers/rootReducer.js';
import ViewContainer from './app/containers/container_viewContainer';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import promise from 'redux-promise';
import Signin from './app/containers/container_FBLogin';
import FriendList from './app/components/FriendList';
import { Router, Scene, Actions} from 'react-native-router-flux';
//creates logger
const logger = createLogger();
// creates store
const store = createStore(
rootReducer,
applyMiddleware(thunk, promise, logger)
);
const findAR = () => (
<Provider store={store}>
<Router scenes={scenes} />
</Provider>
);
const scenes = Actions.create(
<Scene key="root" hideNavBar>
<Scene initial key="login" component={Signin} />
<Scene key="view" component={ViewContainer} type="replace" />
<Scene key="friends" component={FriendList} />
</Scene>
);
AppRegistry.registerComponent('findAR', () => findAR);