vuejs / rfcs

RFCs for substantial changes / feature additions to Vue core
4.85k stars 549 forks source link

vue will consider supporting responsivity for some attributes api #391

Closed SGAMERyu closed 2 years ago

SGAMERyu commented 2 years ago

Does VUE provide a function that allows certain fields in an object to be responded to while others are not

Usage Scenarios:

Sometimes some properties of the returned object are rendered only once in the template and therefore do not require reactive updates, but other properties require reactive updates

iamandrewluca commented 2 years ago

I think what you need is v-once https://v3.vuejs.org/api/directives.html#v-once

posva commented 2 years ago

v-once is indeed an option. You also have markRaw() to skip reactivity in nested objects

Remember to use the forum or the Discord chat to ask questions!