Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { ReactDOM, render } from 'react-dom';
  3. import { Provider } from 'react-redux';
  4. import { browserHistory, Router } from 'react-router';
  5. import { syncHistoryWithStore } from 'react-router-redux';
  6.  
  7. import configureStore from '../store/configureStore';
  8. import routes from '../routes';
  9.  
  10.  
  11. const initialState = {};
  12. const target = document.getElementById('app');
  13.  
  14. const store = configureStore(initialState, browserHistory);
  15. const history = syncHistoryWithStore(browserHistory, store);
  16.  
  17. const node = (
  18.     <Provider store={store}>
  19.       <Router history={history}>
  20.         {routes}
  21.       </Router>
  22.     </Provider>
  23. );
  24.  
  25.  
  26. ReactDOM.render(node, target);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement