Created
October 9, 2019 16:36
-
-
Save TheeBryanWhite/0750b838a8b0e020178d23e719829d61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Store.js | |
import { createStore, compose, applyMiddleware } from 'redux'; | |
import rootReducer from '../reducers/index'; | |
import thunk from 'redux-thunk'; | |
// const store = createStore(rootReducer); | |
const store = createStore( | |
rootReducer, | |
compose( | |
applyMiddleware(thunk) | |
) | |
); | |
export default store; | |
// App.js | |
import React, { Component } from 'react'; | |
import { Provider } from "react-redux"; | |
import store from "./redux/store/index"; | |
import AppRegistry from 'react-native' | |
import { StyleSheet, View } from 'react-native'; | |
import Main from './src/components/Main'; | |
export default function App() { | |
return ( | |
<Provider store={store}> | |
<View style={styles.container}> | |
<Main /> | |
</View> | |
</Provider> | |
); | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: '#fff', | |
alignItems: 'center', | |
justifyContent: 'center', | |
width: '100%' | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment