add and remove class css in html with hooks 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 = ''; }
});