useffect function react code example
Example: useeffect umnount
useEffect(() => {
return () => {
console.log("cleaned up");
};
}, []);
useEffect(() => {
return () => {
console.log("cleaned up");
};
}, []);