-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
37 lines (32 loc) · 890 Bytes
/
App.js
File metadata and controls
37 lines (32 loc) · 890 Bytes
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
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { View, Platform } from 'react-native';
import { createStore, applyMiddleware, compose } from 'redux';
import thunkMiddleware from 'redux-thunk';
import reducer from './src/reducers';
import NavigationContainer from './src/containers/NavigationContainer';
const style = {
flex: 1,
paddingTop: Platform.OS === 'ios' ? 0 : 24,
};
function configureStore(initialState) {
const enhancer = compose(
applyMiddleware(
thunkMiddleware, // lets us dispatch() functions
),
);
return createStore(reducer, initialState, enhancer);
}
const store = configureStore({});
class App extends Component {
render() {
return (
<Provider store={store}>
<View style={style}>
<NavigationContainer />
</View>
</Provider>
);
}
}
export default App;