-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
In certain cases, the view fails to update properly #11232
Comments
In the demo, I found that when the childComponent uses a render function without build-in component "slot", both the "app" and the "app2" work fine. |
You should not manually change the value of slot.default, this will cause problems with some of the compilation optimization strategies that vue does internally. For example, in app.vue the default slot will have the identifier STABLE added to it, and when you change slot.default the identifier will cause it to go into optimization, whereas in app2.vue it won't be a problem because there's no compilation optimization for it in jsx. |
When you add |
thanks for your answer, l don't understand that what is the function of ctx.slots._ , so I will look at the source code and thank you agin Whether because, when slots._ = STABLE, its update will be skip |
Vue version
3.4.30
Link to minimal reproduction
https://stackblitz.com/~/github.com/hickiy/vuedemo
Steps to reproduce
First start the project, you will find that when you click the fold away button, the red border cannot be updated properly. When you switch to app2.vue in main.js, you will find that everything is normal, in fact, the two usage methods should be equivalent
What is expected?
You can update the view normally in both cases, or explain why this happens
What is actually happening?
When the value of a bound reactive variable changes, the border does not update properly
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: