Created
May 23, 2017 13:37
-
-
Save Louiefigz/f0163542a96ea857807b6e51d34d27ed to your computer and use it in GitHub Desktop.
This file contains hidden or 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 App from './App'; | |
import { Provider } from 'react-redux'; | |
import { createStore } from 'redux'; | |
// Requiring the Reducer that we just made | |
import manageTasks from './reducers/manageTodo'; | |
// set a store variable and then we are going to place it as a prop | |
// for Provider as well as App. | |
let store = createStore(manageTasks); | |
// Below we are making store available to Provider. | |
// It's going to be looking for any changes to the state and | |
// then re-render App. | |
ReactDOM.render( | |
<Provider store={store} > | |
<App store={store} /> | |
</Provider>, | |
document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment