In my current React project, I encountered an issue where setting overflow-x: hidden
in the index.css file for the body tag worked fine on desktop screens but not on mobile. I read that adding it to the parent element would be a better solution, however, this method doesn't seem to work in React. Are there any alternative ways to achieve this?