Created
May 26, 2019 19:45
-
-
Save jakejrichards/99c7078f9239f2c051f320f5e0fe1457 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { applyMiddleware, createStore } from 'redux'; | |
import thunk from 'redux-thunk'; | |
import { Provider } from 'react-redux'; | |
import reducer, { initialState } from './store/reducer'; | |
import App from './components/App'; | |
// If you are interested in using the redux devtools | |
import { composeWithDevTools } from 'redux-devtools-extension'; | |
const composeEnhancers = composeWithDevTools({}); | |
const store = createStore(reducer, initialState, composeEnhancers(applyMiddleware(thunk))); | |
const ConnectedApp = () => ( | |
<Provider store={store}> | |
<App /> | |
</Provider> | |
); | |
ReactDOM.render(<ConnectedApp />, document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment