Skip to content

Instantly share code, notes, and snippets.

@onion2k
onion2k / mount.js
Created January 5, 2021 12:00
Using a hook in place of componentWillMount and componentWillUnmount
useEffect(()=>{
console.log("Mounted component")
return () => {
console.log("Unmounted component")
};
});