Created
February 17, 2018 15:13
-
-
Save aofleejay/809c09ede927d98fa2fff3d0bf8bf4b3 to your computer and use it in GitHub Desktop.
Use redux-persist with react
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { Provider } from 'react-redux' | |
import { PersistGate } from 'redux-persist/integration/react' | |
import App from './components/App' | |
import configureStore from './store' | |
const { store, persistor } = configureStore() | |
ReactDOM.render( | |
<Provider store={store}> | |
<PersistGate loading={null} persistor={persistor}> | |
<App /> | |
</PersistGate> | |
</Provider> | |
, document.getElementById('root')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment