Using submodules and serialization #2686
-
Hi, I saw this discussion here regarding store splitting and am currently struggling with serialization (JSON.stringify) due to this approach. My use case is: Unfortunately I can't repro this on the playground, but I'll try and explain myself. I am observing (on Vue 2.7.16, currently planning migration to 3) the same behaviour as described in #1149 , that is in dev mode no problem arises whereas in production I believe this is what's preventing the error in dev mode (since the circular references appear to be under the I managed to resolve this by omitting the Therefore I have some questions:
Thank you very much Francis |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The issue in the playground is that the main store is returning the other stores. That creates state duplication and other other serialization issues. The solution is simple: do not return other stores (or their state) from a store. |
Beta Was this translation helpful? Give feedback.
The issue in the playground is that the main store is returning the other stores. That creates state duplication and other other serialization issues. The solution is simple: do not return other stores (or their state) from a store.