I had an error in one of my transformers that was resulting in my state not being persisted, but that error wasn't being thrown/logged, leading to a lot of confusion. So I had to dig into this package's source code a little bit, and the error was thrown and logged upon calling getStoredState, but not when rehydrating. This can be easily fixed by adding a console.error(err) at line 146 of src/persistReducer.ts for development mode, and it'd save dumb devs like me a bunch of time.
I had an error in one of my transformers that was resulting in my state not being persisted, but that error wasn't being thrown/logged, leading to a lot of confusion. So I had to dig into this package's source code a little bit, and the error was thrown and logged upon calling
getStoredState
, but not when rehydrating. This can be easily fixed by adding aconsole.error(err)
at line 146 ofsrc/persistReducer.ts
for development mode, and it'd save dumb devs like me a bunch of time.