Skip to content

[Documentation] Update for watchers #2541

Open
@bert-w

Description

@bert-w

I found out via StackOverflow that you can watch a nested object property like this:

watch: {
     'someObject.someProp': function (newVal, oldVal) {
        // some logic
     },

This would then trigger when changes are made to this property.

I wasnt able to find this in the documentation. Is it defined somewhere, and if not where's the best page to add it to? https://vuejs.org/v2/guide/computed.html#Watchers ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions