Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'babel-polyfill';
- import React from 'react';
- import { render } from 'react-dom';
- import {
- Router,
- browserHistory,
- } from 'react-router';
- import { createHistory } from 'history'
- import { Provider } from 'react-redux';
- import * as reducers from 'redux/reducers';
- import routes from 'routes';
- import axios from 'axios';
- import promiseMiddleware from 'lib/promiseMiddleware';
- import immutifyState from 'lib/immutifyState';
- import { createStore,
- combineReducers,
- applyMiddleware,
- compose } from 'redux';
- const initialState = immutifyState(window.__INITIAL_STATE__);
- const reducer = combineReducers(reducers);
- const store = applyMiddleware(promiseMiddleware)(createStore)(reducer, initialState, compose(
- window.devToolsExtension ? window.devToolsExtension() : f => f
- ));
- const history = createHistory();
- render(
- <Provider store={store}>
- <Router history={history} children={routes} />
- </Provider>,
- document.getElementById('react-view')
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement