Skip to content

Instantly share code, notes, and snippets.

@jason-shen
Created September 7, 2020 11:51
Show Gist options
  • Save jason-shen/6094563fef24b813ef09e43708ba39a1 to your computer and use it in GitHub Desktop.
Save jason-shen/6094563fef24b813ef09e43708ba39a1 to your computer and use it in GitHub Desktop.
PROVA
userEffect(() => {
console.log(“ComponentDidUpdate”
});
userEffect(() => {
console.log(“ComponentDidMount”
});
userEffect(() => {
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