if effect doesn't need props or state code example
Example: useeffect umnount
useEffect(() => {
return () => {
console.log("cleaned up");
};
}, []);
useEffect(() => {
return () => {
console.log("cleaned up");
};
}, []);