-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$attrs are not triggering render update when inside slots #1346
Labels
🐞 bug
Something isn't working
Comments
AlexandreBonaventure
changed the title
$attrs are triggering render update when inside slots
$attrs are not triggering render update when inside slots
Jun 11, 2020
I debuged for this.The slot not updated because patch Maybe we should marked patch flag
|
As a workaround one can force the update of the wrapper component by updating an attribute:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
3.0.0-beta.14
Reproduction link
https://jsfiddle.net/Lvo5aks1/
Steps to reproduce
Rendering
$attrs
inside a wrapper component (with default slot).It does not seem to be collected as a reactive dependency.
What is expected?
$attrs
should be reactive like any other reactive objectsee here https://jsfiddle.net/tpewsd71/
What is actually happening?
It does not update/trigger a re-render of the slot
Comment
Maybe this is expected, because I think in Vue3 $attrs is not actually a reactive object but just a proxy, thus this is why it is not triggering update. However, coming from Vue 2 where this was a reactive object, it is confusing that it is not anymore and is probably going to break some components.
I wonder then if there is an official recommendation when dealing with this kind of use-case.
The text was updated successfully, but these errors were encountered: