Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Document that functions are stripped from objects and not restored #353

Open
cyberco opened this issue Oct 20, 2020 · 1 comment
Open

Document that functions are stripped from objects and not restored #353

cyberco opened this issue Oct 20, 2020 · 1 comment

Comments

@cyberco
Copy link

cyberco commented Oct 20, 2020

Since objects are stored using JSON.stringify functions are stripped off. They're lost when the object is restored. This basically blocks the option of storing class instances (or other objects with functions) in vuex. Although I think you built a nice library this should be mentioned in the main README.md

@Harm-Nullix
Copy link

Harm-Nullix commented Nov 24, 2021

If I may reference: vuejs/vuex#757 (comment)
Save your classes/methods in code and hydrate them with the data from the store.

Serializable is the key word here

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

2 participants