Open ajfick opened 4 years ago
Same
using "redux-persist": "6.0.0"
Same here. But this was my own fault. I passed the rootReducer instead of the persistedReducer to the store. Hope this helps others.
Same here, please have you found any solution to this... I am passing the persistedReducer to the store.
Below is my store; I am using redux toolkit configureStore
const store = configureStore({ reducer: persistedReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: { ignoredActions: [FLUSH, REHYDRATE,PAUSE, PERSIST, PURGE, REGISTER] } }).concat([ unauthenticateMiddleware, apiSlice.middleware, ]), preloadedState: preloadedState, })
I'm currently working a react-native project and having an issue that causes my app to give a white screen and never load on open. After some debugging, I've found that it appears to be because the
bootstrapped
state value in my PersistGate is never set to true despite it being possible for me to see that my state was rehydrated in the redux devtools. When I manually flip thebootstrapped
state value in the PersistGate totrue
using my react-native devtools, the app immediately loads as expected.One thing to note, it is necessary for me in this project, to be able to insert the
filter
values received from Firebase messaging (notifications) into the state before the rest of the app is rendered. Which is done by the constant declarationinitialStore
. I'm not sure if this is the correct way to handle this with redux-persist, or if it could be the cause of the bootstrapped state value not being set to true.I'm not sure if this is a bug or an error on my part, but not rendering anything at all doesn't seem like the intended result to me.