Updating property of store state overwrites proxy object in SSR #1425
Unanswered
lwansbrough
asked this question in
Help and Questions
Replies: 1 comment 2 replies
-
I'm not following what you are trying to do. If you have a boiled down reproduction, this is more likely to get looked at. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
N/A
Steps to reproduce the bug
Expected behavior
I expected the
value
property of the object to be updated when assigning tothis.domain
, instead the entire property is overwritten as though the proxy setter is ignored.I believe this expectation is consistent with the described behaviour here: https://pinia.vuejs.org/core-concepts/state.html#mutating-the-state
Actual behavior
The state property is overwritten, resulting in
[Vue warn]: toRefs() expects a reactive object but received a plain one.
In the browser,
null
and"example.com"
are logged. I believe this is the correct behaviour.Additional information
Using Vue 2.7, rendering via SSR on Node.js 16. The problem doesn't seem to happen in Chrome/Firefox, only in Node.js during SSR.
Beta Was this translation helpful? Give feedback.
All reactions