-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
31 lines (26 loc) · 844 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
import React, {Component} from 'react';
const ReduxThunk = require('redux-thunk').default;
import {createStore, applyMiddleware, compose} from 'redux';
import {Provider} from 'react-redux';
import rootReducer from './src/redux/rootReducer';
import DashBoard from './src/screens/dashboard';
console.disableYellowBox = true;
// Redux Debugger
let composeEnhancer = compose;
if (__DEV__) {
composeEnhancer = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
}
const store = createStore(
//creates an instance of store to be used globally
rootReducer, // pass in the combined reducers
composeEnhancer(applyMiddleware(ReduxThunk)), // use the middleware for async actions
);
export default class App extends Component {
render() {
return (
<Provider store={store}>
<DashBoard />
</Provider>
);
}
}