Skip to content

Instantly share code, notes, and snippets.

@cihad
Created April 30, 2020 15:55
Show Gist options
  • Save cihad/05de1d4f2dcdd32b5f92fc321390167e to your computer and use it in GitHub Desktop.
Save cihad/05de1d4f2dcdd32b5f92fc321390167e to your computer and use it in GitHub Desktop.
React to Vue
React Vue
useState data
useMemo data
useEffect (with no dependency array) mounted (once), beforeUpdate
useEffect (with dependency array) watch (immediate: true)
return function for useEffect destroyed
useCallback methods
useLayoutEffect beforeMount, beforeUpdate
useLayoutEffect with setTimeout mounted, updated
componentDidMount mounted
componentDidUpdate updated, vm.$nextTick
componentWillUnmount destroyed, this.$once("hook:beforeDestroy", callback) "inside created or mounted"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment