Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 486 Bytes

PersistGate.md

File metadata and controls

23 lines (19 loc) · 486 Bytes

PersistGate example usage

import { PersistGate } from 'redux-persist/es/integration/react'

import configureStore from './store/configureStore'

const { persistor, store } = configureStore()

const onBeforeLift = () => {
  // take some action before the gate lifts
}

export default () => (
  <Provider store={store}>
    <PersistGate 
      loading={<Loading />}
      onBeforeLift={onBeforeLift}
      persistor={persistor}>
      <App />
    </PersistGate>
  </Provider>
)