Hi,
I have a couple of big objects in the store and I am using persists with local forage. Serializations are blocking the main thread. Is there any option to mitigate this issue? There are missing APIs from redux-persist like a throttle. I don't know if that API helps or just delays the problem :)
main thread
There is no such thing as threads in js. There is always only one thread
@aalpgiray - I plan to expose more configuration around this so that you can be in control of the persist rate. Currently it is fixed at attempting to persist every second. This is perhaps a bit overambitious for your case. I'll make sure to get it into the v3.4.0 alpha for you soon. 馃挏
I don't know if that API helps or just delays the problem
I think alternative approaches can be take, like requestAnimationFrame or requestIdleCallback to schedule the persists in a more kind manner.
How can we purge all persisted values and stored state?
@aalpgiray - there is a store.persist.clear() api. 馃檹
it is not available in typescript defs. Or have I missed something.
Most helpful comment
@aalpgiray - there is a
store.persist.clear()api. 馃檹