When working with vue3, if I encounter a situation like this
watch(loading, (new_val, old_val) => {
// How can I determine whether this function was triggered immediately or after the initial run?
}, {immediate:true});
Is there a way to achieve something similar to this?
watch(loading, (new_val, old_val, options) => {
console.log(options.immediate); // Outputs true initially, then false on subsequent runs
}, {immediate:true});
Appreciate any assistance!