Search code examples
reactjsdebuggingjsxcreate-react-appreact-component

How do I stop my ReactJS webite from twitching when I move my cursor?


A simple, one page view website, which I built on ReactJS started twitching anytime I moved my cursor. It seems like the browser width is changing, with a few pixels of margin added to the right, every time that happens. This doesn't seem to happen when viewing with the Chrome browser in mobile screen mode, under the developer tools. Which probably means it's as a result of the cursur interacting with the page. Has anyone encountered something similar?


Solution

  • It usually happens when you have an element that changes its width, padding, margin or border on hover or a Javascript event. This is not caused by React.

    Please, share some css or JS you think may be involved to help more.