Here's the error that is shown in Emulator
This error has appeared while I was integrating redux-persist with Redux Toolkit in the React-native application. I have tried to find various solutions but failed to do so. Any help is appreciated.
This issue has occurred due to the misplacement of the persistStore() code which needed store as a parameter. Its working fine when placed after the store creation code snippet.
Before (Not Working):
export const persistor = persistStore(store); // this line should be after creating the store.
export const store = configureStore({...}); // store creation.
After (Working):
export const store = configureStore({...}); // store creation.
export const persistor = persistStore(store); // Here it is working fine.