Skip to content

Instantly share code, notes, and snippets.

@cdaz5
Last active January 7, 2020 20:23
Show Gist options
  • Select an option

  • Save cdaz5/ad87350e83d19c67e2427aae7e83b31f to your computer and use it in GitHub Desktop.

Select an option

Save cdaz5/ad87350e83d19c67e2427aae7e83b31f to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'react-router-dom';
import { Provider } from 'react-redux';
import history from './config/history';
import httpService from './services/httpService';
import configureStore from './state/store';
import App from './App';
const store = configureStore({});
// call it afer we create the store and import history and you're good to go!
httpService.setupInterceptors(store, history);
ReactDOM.render(
<Provider store={store}>
<Router history={history}>
<App />
</Router>
</Provider>,
document.getElementById('root')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment