Skip to content

Instantly share code, notes, and snippets.

@jason-shen
Created September 7, 2020 12:34
Show Gist options
  • Save jason-shen/e166e32607e9ba6599776e0c2a1a09d8 to your computer and use it in GitHub Desktop.
Save jason-shen/e166e32607e9ba6599776e0c2a1a09d8 to your computer and use it in GitHub Desktop.
PROVA
useEffect(() => {
console.log(“ComponentDidUpdate”
});
useEffect(() => {
console.log(“ComponentDidMount”
},[]);
useEffect(() => {
console.log(“will run when x changes”
},[x]);
useEffect(() => {
run init
return () => {
console.log(“ComponetWillUnmount”);
}
},[]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment