Last active
January 31, 2016 03:24
-
-
Save StevenJL/ab99773e5b25a6dfcf37 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 { createStore } from 'redux' | |
| // import `Provider` from the react-redux | |
| import { Provider } from 'react-redux' | |
| // Assuming `App` is the root component | |
| import App from './containers/App' | |
| import todoApp from './reducers' | |
| let store = createStore(todoApp) | |
| let rootElement = document.getElementById('root') | |
| ReactDOM.render( | |
| // now `store` will be available to all the components below App | |
| <Provider store={store}> | |
| <App /> | |
| </Provider>, | |
| rootElement | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment