Skip to content

Instantly share code, notes, and snippets.

@jinwook-k
Created September 5, 2020 01:10
Show Gist options
  • Save jinwook-k/347c49686a435a7457420c0061b29e64 to your computer and use it in GitHub Desktop.
Save jinwook-k/347c49686a435a7457420c0061b29e64 to your computer and use it in GitHub Desktop.
client/src
// other imports
...
// Adding redux and reducers
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import rootReducer from './reducers'
// Creates our store to use our reducers and the chrome extension to debug the redux store
const store = createStore(
rootReducer,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
ReactDOM.render(
// Connects the store to our application
<Provider store={store}>
<Header/>
<App />
</Provider>,
document.getElementById('root')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment