index.js 1012 Bytes
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import {Provider} from 'react-redux';
import 'antd/dist/antd.css';
import { applyMiddleware, createStore} from 'redux';
import promiseMiddleware from 'redux-promise';
import ReduxThunk from 'redux-thunk';
import Reducer from './_reducers/index';

const creatStoreWithMiddleware = applyMiddleware(promiseMiddleware,ReduxThunk)(createStore)
ReactDOM.render(
  <Provider
      store={creatStoreWithMiddleware(Reducer,
          window.__REDUX_DEVTOOLS_EXTENTION__&&
          window.__REDUX_DEVTOOLS_EXTENTION__()
        
        )}
  > 
      <App />
  </Provider>

   
   
   ,document.getElementById('root')
   
   
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();