Skip to content

Commit

Permalink
Merge branch 'canary' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Sep 1, 2020
2 parents 623130a + aa568a5 commit c4497f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/with-redux-persist/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { PersistGate } from 'redux-persist/integration/react'

export default function App({ Component, pageProps }) {
const store = useStore(pageProps.initialReduxState)
const persistor = persistStore(store)
const persistor = persistStore(store, {}, function () {
persistor.persist()
})

return (
<Provider store={store}>
<PersistGate loading={<Component {...pageProps} />} persistor={persistor}>
<PersistGate loading={<div>loading</div>} persistor={persistor}>
<Component {...pageProps} />
</PersistGate>
</Provider>
Expand Down

0 comments on commit c4497f5

Please sign in to comment.