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
I'm trying to use this library to sync parts of my store to sessionStorage.
The project uses SSR so we need to check for availability of storage.
Unfortunately, it seems impossible to use the "storage" and "checkStorageAvailability" config options at the same time, because this code in localStorageSync function: if (config.storage === undefined && !config.checkStorageAvailability || (config.checkStorageAvailability && checkIsBrowserEnv()) ) { config.storage = localStorage || window.localStorage; }
will override config.storage to use localstorage if(config.checkStorageAvailability && checkIsBrowserEnv()).
Does anyone have alternative ideas on how to run this metaReducer conditionally only if inside a browser environment, with sessionStorage instead of localStorage?
The text was updated successfully, but these errors were encountered:
I'm trying to use this library to sync parts of my store to sessionStorage.
The project uses SSR so we need to check for availability of storage.
Unfortunately, it seems impossible to use the "storage" and "checkStorageAvailability" config options at the same time, because this code in localStorageSync function:
if (config.storage === undefined && !config.checkStorageAvailability || (config.checkStorageAvailability && checkIsBrowserEnv()) ) { config.storage = localStorage || window.localStorage; }
will override config.storage to use localstorage if(config.checkStorageAvailability && checkIsBrowserEnv()).
Does anyone have alternative ideas on how to run this metaReducer conditionally only if inside a browser environment, with sessionStorage instead of localStorage?
The text was updated successfully, but these errors were encountered: