I
I
Ilya Kochkin2020-05-06 20:04:31
Vue.js
Ilya Kochkin, 2020-05-06 20:04:31

How to understand what data has been updated in the updated method in vue.js?

Good afternoon, how can I determine that specific data has been changed with the updated method? In the vue component
, Watch is triggered before the Updated method is called, and it is in this method of the vue component that you need to pull out the changes, there was an idea to store a global variable in a non-component, and change it in watch when data changes, and when updated, compare these variables - but looks like a crutch

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Shvedov, 2020-05-06
@mr_Koch

Use Promise and about updating the component, do you want to wait for the redraw or do something before it, use vue next tick
Reference

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question