A
A
Andrey Sobolev2020-11-05 16:48:57
Vue.js
Andrey Sobolev, 2020-11-05 16:48:57

How to track props change in Vue3 component?

Let's say I have a property

prop: {
    coords:
        type: Array,
        required: true,
}
methods: {
    foo(_newCoords) {//не важно}
}


How can I track when the changed coords property is received so that foo is fired when new coordinates arrive?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-11-05
@yarkov Vue.js

Did they cut watchers in Vue 3 or what?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question