I have just started developing with React so I might do this completely wrong, but I have a component that changes some icons when it is hovered, so I updated the state onMouseEnter and onMouseOut and it does what I expect it to do. My issue is that each time I hover the component and the state gets updates, the browser's refresh button and the favicon are flickering. Do you have any idea why this happens and what can I do to stop this behaviour? It is visually annoying. Thank you!
Asked
Active
Viewed 455 times
0
-
What element are you rendering into? – WayneC Jul 08 '16 at 13:27
-
I am using React Router and rendering that into a div in the body – nightfury Jul 08 '16 at 13:38
-
The problem was that the icons weren't cached and they were being downloaded on each hover state change. – nightfury Jul 08 '16 at 14:13