Last active
February 17, 2016 03:25
-
-
Save dan-diaz/e49b95989c8ddc5f03a8 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| </head> | |
| <body> | |
| <div id="schoolLunch"></div> | |
| <script src="generated/js/bundle.js"></script> | |
| </body> | |
| </html> |
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 { createStore } from 'redux'; | |
| import { Provider } from 'react-redux'; | |
| import reducer from './reducers/reducer'; | |
| import App from './containers/App'; | |
| let initialState = { | |
| childInfos: 1, | |
| adultInfos: 1 | |
| } | |
| }; | |
| let store = createStore(reducer, initialState) | |
| let rootElement = document.getElementById('schoolLunch') | |
| ReactDOM.render( | |
| <Provider store={store}> | |
| <App /> | |
| </Provider>, | |
| rootElement | |
| ); |
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
| { | |
| "scripts": { | |
| "build": "babel js --watch --out-file generated/js/bundle.js" | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment