-
-
Save Eliav2/b77d18de7b4d4cb22d22f98412451e5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BasicUnmount = () => { | |
const log = useLog(); | |
useEffect(() => { | |
log('mount'); | |
return () => log('unmount'); | |
}, []); | |
useEffect(() => { | |
log('render'); | |
return () => log('un-render'); | |
}); | |
log('update call'); | |
return <div>asd</div>; | |
/** | |
* expected logs: | |
* update call {call:1,render:0} | |
* mount {call:1,render:1} | |
* render {call:1,render:1} | |
* unmount {call:1,render:1} | |
* un-render {call:1,render:1} | |
*/ | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment