I learned vuejs recently and I seem to be having problems in fully grasping the essential differences between the usage of ref and reactive. When is it right to use ref or reactive?
Based on this article from Anthony Fu (a Vue.js champion) we can summarize it in these points:
.value property, but reactive with any nested propertywatch(()=>reactiveObj,(newVal,oldVal)...., unlike refs which are unwrapped watch(refProp,(newVal,oldVal)....Conclusion :
I’d say go with
refwhenever you can