Advertisement
Guest User

Untitled

a guest
May 30th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. import 'babel-polyfill';
  2. import React from 'react';
  3. import { render } from 'react-dom';
  4. import {
  5. Router,
  6. browserHistory,
  7. } from 'react-router';
  8. import { createHistory } from 'history'
  9. import { Provider } from 'react-redux';
  10. import * as reducers from 'redux/reducers';
  11. import routes from 'routes';
  12. import axios from 'axios';
  13. import promiseMiddleware from 'lib/promiseMiddleware';
  14. import immutifyState from 'lib/immutifyState';
  15. import { createStore,
  16. combineReducers,
  17. applyMiddleware,
  18. compose } from 'redux';
  19.  
  20.  
  21. const initialState = immutifyState(window.__INITIAL_STATE__);
  22. const reducer = combineReducers(reducers);
  23. const store = applyMiddleware(promiseMiddleware)(createStore)(reducer, initialState, compose(
  24. window.devToolsExtension ? window.devToolsExtension() : f => f
  25. ));
  26.  
  27. const history = createHistory();
  28.  
  29. render(
  30. <Provider store={store}>
  31. <Router history={history} children={routes} />
  32. </Provider>,
  33. document.getElementById('react-view')
  34. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement