Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

cannot be serialized as JSON : Store #331

Open
maelswarm opened this issue Apr 12, 2021 · 2 comments
Open

cannot be serialized as JSON : Store #331

maelswarm opened this issue Apr 12, 2021 · 2 comments

Comments

@maelswarm
Copy link
Contributor

maelswarm commented Apr 12, 2021

Reason: `object` ("[object Object]") cannot be serialized as JSON. Please only return JSON serializable data types.

We can't be storing non-serializable objects in the store (bettercalldev?).

@maelswarm
Copy link
Contributor Author

maelswarm commented Apr 12, 2021

"It is highly recommended that you only put plain serializable objects, arrays, and primitives into your store. It's technically possible to insert non-serializable items into the store, but doing so can break the ability to persist and rehydrate the contents of a store, as well as interfere with time-travel debugging."

https://stackoverflow.com/questions/40941079/why-redux-store-should-be-serializable

"next-redux-wrapper" (ultimately getServerSideProps) doesn't like when non-serializable types are in the store.

BetterCallDev and the toolkit and wallet are the culprits in the system reducer itself.

@maelswarm
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant