<div id="output" />
const log = (msg) => document.getElementById('output').innerHTML += `${msg}<br/>`;

const state = Vue.observable({ val: true });
const instance = new Vue();

instance.$watch(
  () => {
    log('record synchronous');
    return state.val;
  },
  () => log('trigger synchronous')
);

instance.$watch(
  async () => {
    await Promise.resolve();
    log('record asynchronous');
    return state.val;
  },
  () => log('trigger asynchronous')
);

Promise.resolve().then(() => {
  log('change state');
  state.val = false;
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js