[feature request] @Watch multiple properties.
See original GitHub issueIt would be great if we could do:
@Watch([
'prop1',
'prop2',
])
handler() {
// Do something
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:8 (3 by maintainers)
Top Results From Across the Web
vue js watch multiple properties with single handler
So I am having to write the same code multiple times above. Is it possible to simply have all properties being watched and...
Read more >Deleting multiple properties at once - SmartBear Community
I am using ready api for a quite long time and there was a need to delete multiple properties at single point of...
Read more >[GA4] About roll-up properties - Analytics Help - Google Support
Roll-up properties provide a broad view of your business across products, brands, or regions by combining data from multiple source properties into a...
Read more >Feature request: dual sharing - Microsoft Community Hub
Having two people share would be useful. In real life you can have two things in the room to switch between. You need...
Read more >Feature request tracking for B2B SaaS teams - Savio
Feature requests are saved with the customer, account, and account properties like MRR and Plan; You can quickly see and compare feature requests...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Alendorff
Hi.
vm.$watch
can receive a function whereasComponentOption.watch
can’t do so.https://vuejs.org/v2/api/#watch
So this is actually something that you can do already do in vue.js and it looks like there are a couple different ways to do it.
Below is the discussion on the exact feature request to Vue.js https://github.com/vuejs/vue/issues/844#issuecomment-335026928
It looks like the most document way is to use a function to watch more than one property. https://vuejs.org/v2/api/#vm-watch shows the following example
It would be nice to be able to do something like