is a good idea to add class in react hooks with document.body.addclasslist 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 = ''; }
});