Open Hodor9898 opened 4 years ago
cookie 太长了会导致不会更新
I'm seeing this same behavior. Were you able to fix it?
If there is a limit on the size of a cookie that can be stored with redux-persist, could we know what it is?
I'm pretty sure, this is the same issue as mentioned in #15 and since that issue is already 2 years old without any solution I think we can agree this repo is dead..
@marsbergen what is the alternative for this?
I had a similar issue when I used SSR, I changed httpOnly to false on the server side and it works for me:
const persistConfig = {
key: "root",
storage: new CookieStorage(cookieJar, {setCookieOptions: {httpOnly: false}}),
stateReconciler(inboundState, originalState) {
// Ignore state from cookies, only use preloadedState from window object
return originalState
}
}
When i load the application i see that the initial value of the reducer is stored in the cookies, but after i update the state it doesn't change the cookie,
App.js
store.js