document.body.classList.add/remove not working as expected
document.body.classList.add/remove not working as expected When I call add(), it only adds the class attribute to the body element, but it doesn’t attach any value to it. Meanwhile, if I manually add the class to the body element and then call remove(), nothing happens useEffect(() => { document.body.classList.add(‘overflow-hidden’) return ( document.body.classList.remove(‘overflow-hidden’) ) }, []) This… Read More document.body.classList.add/remove not working as expected