Skip to content

Instantly share code, notes, and snippets.

@LeanSeverino1022
Last active November 9, 2020 08:03
Show Gist options
  • Save LeanSeverino1022/aab00014114e4045c82ff6adb097ffa9 to your computer and use it in GitHub Desktop.
Save LeanSeverino1022/aab00014114e4045c82ff6adb097ffa9 to your computer and use it in GitHub Desktop.
Daily log

11/08

you can tell React to only execute the side effect once (at mount time), by passing an empty array: - react

useEffect(() => {
  console.log(`Component mounted`)
}, [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment