redux-persist
redux-persist copied to clipboard
redux-persist/createPersistoid: error serializing state TypeError: Converting circular structure to JSON
Trying to save socket.io instance in reducer this error message pops continuously
This is how we are dispatching the socket instance
const socket = io(baseURL, { auth: { token } });
dispatch(socketConnectAction(socket))
index.js:1 redux-persist/createPersistoid: error serializing state TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Socket'
| property 'io' -> object with constructor 'Manager'
| property 'nsps' -> object with constructor 'Object'
--- property '/' closes the circle
at JSON.stringify (<anonymous>)
at defaultSerialize (createPersistoid.js:126)
at processNextKey (createPersistoid.js:71)
Any update on this?
redux-persist/createPersistoid: error serializing state TypeError: Converting circular structure to JSON --> starting at object with constructor 'EventEmitter' | property '_events' -> object with constructor 'Events' | property 'change' -> object with constructor 'EE' --- property 'context' closes the circle
redux-persist/createPersistoid: error serializing state TypeError: Converting circular structure to JSON --> starting at object with constructor 'EventEmitter' | property '_events' -> object with constructor 'Events' | property 'change' -> object with constructor 'EE' --- property 'context' closes the circle