-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ios.js
41 lines (36 loc) · 1.01 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
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import App from './App.js'; //main container component
/*Redux Hookup*/
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, combineReduxers, compose } from 'redux';
import thunkMiddleware from 'redux-thunk';
import { createLogger } from 'redux-logger';
import reducer from './src/_reducers';
const loggerMiddleware = createLogger({ predicate: (getState, action) => __DEV__ });
function configureStore(initialState) {
const enhancer = compose(
applyMiddleware(
thunkMiddleware,
loggerMiddleware,
),
);
return createStore(reducer, initialState, enhancer);
};
const store = configureStore({});
export default class Magecase extends Component {
render() {
console.log('TOPLEVEL', store)
return (
<Provider store={store}>
<App dispatch={store.dispatch}/>
</Provider>
);
}
}
AppRegistry.registerComponent('Magecase', () => Magecase);