useeffect react using class code example
Example: setting className using useEffect
useEffect(() => {
document.body.className = 'signin';
return () => { document.body.className = ''; }
});
useEffect(() => {
document.body.className = 'signin';
return () => { document.body.className = ''; }
});