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
Out of curiosity, does this library handle the (unlikely) event of a user exceeding the localStorage quotum in a session? From what I understand (http://stackoverflow.com/a/14191200/5918874) in that case an exception will be thrown and no new data will be written.
Theoretically it could be possible since users can set the maximum themselves, or the device could be limited in available space.
The text was updated successfully, but these errors were encountered:
For anyone having the same problem, here is my dirty solution :
import_from"lodash"importpersistState,{mergePersistedState}from'redux-localstorage'importadapterfrom'redux-localstorage/lib/adapters/localStorage';conststorage=window.localStorage...constisStorageOk=()=>{try{storage.setItem("test","1");storage.removeItem("test");returntrue}catch(e){console.warn("No local storage",e)}}conststorageAdapter=adapter(storage)constenhancers=_.compact([applyMiddleware(...middlewares),isStorageOk()&&persistState(storageAdapter,storageKey)])constenhancer=composeEnhancers(...enhancers)exportconststore=createStore(reducer,enhancer)
Out of curiosity, does this library handle the (unlikely) event of a user exceeding the localStorage quotum in a session? From what I understand (http://stackoverflow.com/a/14191200/5918874) in that case an exception will be thrown and no new data will be written.
Theoretically it could be possible since users can set the maximum themselves, or the device could be limited in available space.
The text was updated successfully, but these errors were encountered: