Replace object in state while keeping reactivity in component #2341
Unanswered
Cpousson
asked this question in
Help and Questions
Replies: 1 comment
-
this should work so you are likely extracting properties of the object with |
Beta Was this translation helpful? Give feedback.
0 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.
-
I have a complex object in state that I save to the server and the server returns a fresh copy.
lets say it looks like this:
rule =
{
id:number,
someinterface:interface
someinterace2:interface
etc...
}
when I return the object to pinnia and assign the results in the pinnia action (this.rule = response) I lose all v-model connectivity in my components. This makes sense to me since I am replacing the object as a whole but I was wondering if there was a quick way to re-establish the reactivity.
Beta Was this translation helpful? Give feedback.
All reactions