Re assignment of ref variable cannot be rendered #6746
Unanswered
huifer
asked this question in
Help/Questions
Replies: 2 comments 3 replies
-
Why can't the ref variable be recognized when it is reassigned |
Beta Was this translation helpful? Give feedback.
3 replies
-
If you open the developer tools you will find that the value has changed, but the view layer has not been updated. If you add a method in setup() to print count.value, you will find that its value is 0, and the value in the setup can be judged internally. The change in the click does not change the value in the setup, maybe here judge core/packages/reactivity/src/ref.ts Lines 145 to 150 in 6e8b6b3 |
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
-
Here is the code I wrote
I know that I need to use the following code to replace the data of count variable to achieve my effect
The numeric display of the button changes from 0 to 100。Is it possible to reassign the count variable to achieve data rendering changes instead of forcing a certain writing method
Beta Was this translation helpful? Give feedback.
All reactions