tqtezos / minter

OpenMinter is dApp framework for enabling the creation and collection of non-fungible tokens (NFTs) on Tezos.
MIT License
192 stars 91 forks source link

cannot be serialized as JSON : Store #331

Open maelswarm opened 3 years ago

maelswarm commented 3 years ago
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 commented 3 years ago

"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 commented 3 years ago

https://github.com/GillianPerard/typescript-json-serializer