redux-in-worker
redux-in-worker copied to clipboard
How to use redux-persist
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!
I think it would be desirable to persist state in the worker. Though, I'm not sure if it's possible.
hmmm. I guess I'll have to go Vanilla on that one!
Thanks for your reply.