You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constpersistedReducer=persistReducer(persistConfig, combinedReducer); // Create a new reducer with our existing reducer
57
+
58
58
conststore=createStore(
59
59
persistedReducer,
60
60
bindMiddleware([thunkMiddleware])
61
-
);
62
-
store.__persistor=persistStore(store);
61
+
); // Creating the store again
62
+
63
+
store.__persistor=persistStore(store); // This creates a persistor object & push that persisted object to .__persistor, so that we can avail the persistability feature
64
+
63
65
return store;
64
66
}
65
67
};
66
68
67
-
//export an assembled wrapper
69
+
//Export the wrapper & wrap the pages/_app.js with this wrapper only
constpersistedReducer=persistReducer(persistConfig,combinedReducer);// Create a new reducer with our existing reducer
37
+
37
38
conststore=createStore(
38
39
persistedReducer,
39
40
bindMiddleware([thunkMiddleware])
40
-
);
41
-
store.__persistor=persistStore(store);
41
+
);// Creating the store again
42
+
43
+
store.__persistor=persistStore(store);// This creates a persistor object & push that persisted object to .__persistor, so that we can avail the persistability feature
44
+
42
45
returnstore;
43
46
}
44
47
};
45
48
46
-
// export an assembled wrapper
49
+
// Export the wrapper & wrap the pages/_app.js with this wrapper only
0 commit comments