I tried adding redux persist to my application, followed all the guidelines, however, it shows blank white screen, Please I am lost of idea, solution...
My Stack is
"expo": "^45.0.5",
"react-redux": "^8.0.2",
"redux": "^4.2.0",
"redux-persist": "^6.0.0",
Hello Devs.
I tried adding redux persist to my application, followed all the guidelines, however, it shows blank white screen, Please I am lost of idea, solution...
My Stack is "expo": "^45.0.5", "react-redux": "^8.0.2", "redux": "^4.2.0", "redux-persist": "^6.0.0",
Below is my store.js
const preloadedState = { auth: { user: false, showWallet: false, accessToken: null } }
const persistConfig = { key: 'root', storage: AsyncStorage, version: 1, whitelist: ['auth'], blacklist: [apiSlice.reducerPath], stateReconciler: autoMergeLevel2, }
`const reducers = {
}`
const combinedReducer = combineReducers(reducers);
export const rootReducer = ( state, action ) => { if( action.type === RESET_STATE_ACTION_TYPE ) { state = {} } return combinedReducer(state, action) }
const persistedReducer = persistReducer(persistConfig, combinedReducer)
const store = configureStore({ reducer: persistedReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: { ignoredActions: [FLUSH, REHYDRATE,PAUSE, PERSIST, PURGE, REGISTER] } }).concat([ unauthenticateMiddleware, apiSlice.middleware, ]), preloadedState: preloadedState })
export default store;
And on my App.js
`
If I removed the <PersistGate .../> my app will be fine Please is there anything I am missing here.
PS: No error message.