Why isn't the prop expression evaluated inside child components' render functions? #9494
Unanswered
AkiSakurai
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is a simple program (playground) to demonstrate the issue:
Label1 is a simple component that shows a title with a single string prop, and Label2 shows the title with a function prop where we pass a lambda function as the prop.
Updating the first prop will cause the render function to be called for the entire components tree, while the second prop will only call the corresponding component.
I am curious why Vue props are not implemented like the second prop, which allows more fine-grained updates?
App.vue
Label1.vue
Label2.vue
Beta Was this translation helpful? Give feedback.
All reactions