Sami C.
Sami C.

Sep 19, 2021

·
1 min read

Watch complex property in VueJS

You can use a deep watcher to properly watch for nested data:

complexProperty = {    prop1: 'a',    prop2: 'b'
}
watch: {
complexProperty: {
handler(val, oldval){
// do stuff
},
deep: true
}
}

Enjoy!

Vuejs
Java Script
Vuejs 2
Property

--

--

More from Sami C.

Freelance Software Engineer

Recommended from Medium

John Leonard

John Leonard

df is an array of objects I want to simplify this code, maybe the usage of Object.values

Shay Malchi

Shay Malchi

Understanding React’s useMemo hook through a simple example

Zach Olson

Zach Olson

Migrate from CSS to SCSS

Angular and Sass logo
Vitaliysteffensen

Vitaliysteffensen

How I eliminate ALL unnecessary Rerenders in React

Filipe Névola

Filipe Névola

in

Meteor Blog

Meteor 1.9 (Node.js 12) and new Roadmaps

Alexsidor

Alexsidor

Let's talk about Stack Data Structures

Kunjesh

Kunjesh

Basic Hooks in React

Samantha Ming

Samantha Ming

How to Format Currency in ES6 with Intl.NumberFormat

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Get unlimited access
Sami C.

Sami C.

139 Followers

Freelance Software Engineer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech