v-model not binding with reactive #6496
Replies: 2 comments 4 replies
-
|
This is all expected behavior. I'll move this to Q&A discussions so the community can help you understand. |
Beta Was this translation helpful? Give feedback.
-
|
In your example you aren't actually updating You can either:
A ref is a reference, if you want to change it you have to assign a new value to it, like you did in your example. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Vue version
^3.2.37
Link to minimal reproduction
https://sfc.vuejs.org/#eNp9UsFu2zAM/RXCFzuAY689BkmwAetlh2VYt1ymHRyHTpTZkibRKYrA/15KdlKnCKKDTUrkI/n4TtEXY7Jji9EsmrvSSkPgkFqzFEo2RluCE1isUv4UJckjpvBSULmHDiqrG4g5N77E/lZ6uM5ytj0wPwpVI8G2oOLnAAKLC15ygmIG8Sc+cQobNq21MXQTn1dq5c6ZVUiqhvgHPueo0FAyxk8hmcBiCSehADyIrjGr9S6Jf+2lA4VHtLAvjEHlYsboUh5zi2hmQLZFuAHMFNzF/Lp6eh4gA2IAmOc9p8wmO4SNqQvC4AHMN5Yt/nvW5HYhovZBRHCcNnqLNbvjiUS0nHtK+wy/HuAzjsiYlhNPcXUFXRcS8j5jVOrxRqnqXpXqqgB7V9jz/DJdlEa9HKZNYbKD04rFFVgTw4MTEUP14CJikXhfRHsi42Z57qrSK+fgMm13OVuZbRXJBjN0zXRj9YtDy8Ai8hDcRMclB7l91DHUhdrxgL7mWNNbrKTCH1Yb90HKZ9WZ8LYYRybcs6DA2bqoWwxDCBJEr4Ydf1abA5aU9tcW/7fS4rZXlb/zzY6UjY2kS4kndlzyJ24NU4yz9zLx35BStYq3qhWUe54JWY0XKRKsGebb8+p7ZgrrMAmmIyvVTlavSZgle0ecMCDAmne4gPhxOH52XqKk5EYLKay9qu+KmpcZZN0ScZefy1qW/5j6vt1Av2eod4E0nAv3KurTBpixnLo35M6Rmw==
Steps to reproduce
dataReactive = reactive({})) is not updated. Is this a desired effect forreactive? Why?dataRef = ref({})) does is updated.What is expected?
reactive.What is actually happening?
reactive.dataReactivechanging whendataRefis changed. WTF!System Info
No response
Any additional comments?
No response
Beta Was this translation helpful? Give feedback.
All reactions