pinia-plugin-persistedstate icon indicating copy to clipboard operation
pinia-plugin-persistedstate copied to clipboard

[core] Circular references

Open tanghaojie opened this issue 3 years ago • 1 comments

Clear and concise description of the problem

Is there any way custom circular references persist ?

Suggested solution

custom serialization , or exclude circular key

Alternative

No response

Additional context

No response

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

tanghaojie avatar Aug 31 '22 01:08 tanghaojie

Hi, the reason circular references arent managed is mostly due to serialization being handled by JSON.stringify/JSON.parse and it doesnt work with circular references. There is probably a workaround using either a custom serializer or the hooks to restore the references ?

prazdevs avatar Sep 01 '22 09:09 prazdevs

Marking this as stale, feel free to reopen with more info if the issue is still existing!

prazdevs avatar Nov 13 '22 15:11 prazdevs