-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
41 lines (35 loc) · 1.11 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
import React, { Component } from 'react';
import Navigation from './App/Navigation/Navigation'
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './App/Redux/Reducer/index'
import rootsaga from './App/Saga/index'
import { SafeAreaView } from 'react-navigation'
import { StatusBar } from 'react-native'
import {Colors } from './App/Metrics/index'
/**
* We are initializing our saga and redux store in this file.
* Saga middleware will be listneing whenever we invoke any action.
*/
const sagaMiddleware = createSagaMiddleware()
const store = createStore(
reducer,
applyMiddleware(sagaMiddleware)
)
sagaMiddleware.run(rootsaga)
export default class App extends Component {
render() {
return (
<Provider store={store}>
<SafeAreaView forceInset={{ bottom: 'never' }} style={{ flex: 1 }}>
{/*
Customize your own StatusBar here
*/}
<StatusBar backgroundColor={Colors.coffee}/>
<Navigation />
</SafeAreaView>
</Provider>
);
}
}