redux-devtools/examples/todomvc/index.js

29 lines
629 B
JavaScript
Raw Normal View History

2015-07-14 22:46:44 +03:00
import 'todomvc-app-css/index.css';
2015-10-17 04:11:16 +03:00
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
2015-10-17 04:11:16 +03:00
import configureStore from './store/configureStore';
import Root from './containers/Root';
const store = configureStore();
2015-07-14 22:46:44 +03:00
2015-10-17 04:11:16 +03:00
render(
<AppContainer
component={Root}
props={{ store }}
/>,
2015-07-14 22:46:44 +03:00
document.getElementById('root')
);
if (module.hot) {
module.hot.accept('./containers/Root', () => {
render(
<AppContainer
component={require('./containers/Root').default}
props={{ store }}
/>,
document.getElementById('root')
);
});
}