Using the key attribute to control component refresh in vue failed #11860
Answered
by
LinusBorg
pengzihao2002
asked this question in
Help/Questions
-
I need to click a button to modify the key value of the component through the bound function, and I find that the key value has changed, but the component is not unloaded for re-rendering.I checked a lot of information on the Internet, found that they are so to achieve page refresh, this problem has been troubled for a long time.I hope there are kind people to guide me how to correctly use the key attribute to complete the page refresh.
|
Beta Was this translation helpful? Give feedback.
Answered by
LinusBorg
Sep 9, 2024
Replies: 1 comment 5 replies
-
|
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
pengzihao2002
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
refresh_content
is a plain, nonreactive variable. Changing it will not trigger a re-render, and so won't update thekey
. use aref()
instead