Skip to content

Instantly share code, notes, and snippets.

@ycmjason
Last active February 26, 2020 16:26
Show Gist options
  • Save ycmjason/90694145fbc9f876c12e1b2e8dd4ff7f to your computer and use it in GitHub Desktop.
Save ycmjason/90694145fbc9f876c12e1b2e8dd4ff7f to your computer and use it in GitHub Desktop.
const watchers: (() => any)[] = []
const watch = (callback: () => any) => {
callback() // this is what Vue 3 watch() will do
watchers.push(callback)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment