Skip to content

Instantly share code, notes, and snippets.

@designdevy
Forked from jakejrichards/index.tsx
Created August 3, 2020 06:08
Show Gist options
  • Save designdevy/2585d4d37fbb6f77d89f1f2c2d279550 to your computer and use it in GitHub Desktop.
Save designdevy/2585d4d37fbb6f77d89f1f2c2d279550 to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDOM from 'react-dom';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import reducer, { initialState } from './store/reducer';
import App from './components/App';
// If you are interested in using the redux devtools
import { composeWithDevTools } from 'redux-devtools-extension';
const composeEnhancers = composeWithDevTools({});
const store = createStore(reducer, initialState, composeEnhancers(applyMiddleware(thunk)));
const ConnectedApp = () => (
<Provider store={store}>
<App />
</Provider>
);
ReactDOM.render(<ConnectedApp />, document.getElementById('root'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment