redux-devtools/examples/todomvc/index.js

32 lines
694 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>
<Root
store={ store }
/>
</AppContainer>,
2015-07-14 22:46:44 +03:00
document.getElementById('root')
);
if (module.hot) {
module.hot.accept('./containers/Root', () => {
const RootContainer = require('./containers/Root').default;
render(
<AppContainer>
<RootContainer
store={ store }
/>
</AppContainer>,
document.getElementById('root')
);
});
}