The order of execution of setTimeout, nextTick, process.nextTick, etc. of vue

I read a lot of tutorials and said that process.nextTick was the first to be executed, but I was the last to run it myself.
vue"s nextTick is supposed to give priority to promise, but I also execute it after comparison when I run.
what kind of task should the execution of watch belong to, Object.observe?

export default {
  data() {
    return {
      a = false
    }
  }
  watch: {
    a() {
      console.log("watch")
    }
  }
  methods: {
    myprint() {
      this.a = true
      setTimeout(() => console.log("settimeout"), 0)
      this.$nextTick(() => console.log("vue nexttick"))
      process.nextTick(() => console.log("process.nexttick"))
      Promise.resolve().then(() => console.log("promise"))
      console.log("start")
    }
  }

print out the result as:

start
promise
watch
vue nexttick
settimeout
process.nexttick
May.20,2022

read this article
https://github.com/nodejs/nod...


personal understanding:
process.nextTick is a method in node, and when executed in a browser, it will degenerate to setTimeout, so it is the slowest.
both vue.$nextTick and watch use promise, so these three will be faster.

Menu