static-cms/src/index.js
2016-07-18 15:07:59 -03:00

27 lines
704 B
JavaScript

import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import configureStore from './store/configureStore';
import routes from './routing/routes';
import history, { syncHistory } from './routing/history';
import 'file?name=index.html!../example/index.html';
import './index.css';
const store = configureStore();
// Create an enhanced history that syncs navigation events with the store
syncHistory(store);
const el = document.createElement('div');
el.id = 'root';
document.body.appendChild(el);
render((
<Provider store={store}>
<Router history={history}>
{routes}
</Router>
</Provider>
), el);