Skip to content

Instantly share code, notes, and snippets.

@dan-diaz
Last active February 17, 2016 03:25
Show Gist options
  • Select an option

  • Save dan-diaz/e49b95989c8ddc5f03a8 to your computer and use it in GitHub Desktop.

Select an option

Save dan-diaz/e49b95989c8ddc5f03a8 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="schoolLunch"></div>
<script src="generated/js/bundle.js"></script>
</body>
</html>
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
);
{
"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