-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
34 lines (29 loc) · 981 Bytes
/
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
import React from 'react';
import { createAppContainer } from 'react-navigation';
import { StatusBar } from 'react-native'
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
import thunk from 'redux-thunk';
import firebase from 'firebase';
import firebaseConfig from './firebase/firebase.config'
import navigationStack from './navigation/navigation.stack'
import lineReportReducer from './store/reducers/lineReport';
// Firebase config
firebase.initializeApp(firebaseConfig);
// Navigation config
const AppContainer = createAppContainer(navigationStack);
// Redux config
const rootReducer = combineReducers({
lineReporter: lineReportReducer
});
const store = createStore(rootReducer, compose(
applyMiddleware(thunk)
));
export default App = () => {
return (
<Provider store={store}>
<StatusBar backgroundColor='white' barStyle="dark-content" />
<AppContainer />
</Provider>
);
}