redux-in-worker icon indicating copy to clipboard operation
redux-in-worker copied to clipboard

How to use redux-persist

Open Roshdy opened this issue 1 year ago • 2 comments

Hello, I tried to add redux-persist with no luck.

I tried in App.js

const store = wrapStore(new Worker(new URL('./store.worker', import.meta.url)), {});
const persistor = persistStore(store);

but i get the error: Failed to execute 'postMessage' on 'Worker': function register(key)

When I tried to trace it, sadly I couldn't figure out anything

Any help would be great!

Roshdy avatar Sep 05 '23 10:09 Roshdy

I think it would be desirable to persist state in the worker. Though, I'm not sure if it's possible.

dai-shi avatar Sep 05 '23 10:09 dai-shi

hmmm. I guess I'll have to go Vanilla on that one!

Thanks for your reply.

Roshdy avatar Sep 06 '23 16:09 Roshdy