How do you Hover in ReactJS? - onMouseLeave not registered during fast hover over

前端 未结 13 2268
旧时难觅i
旧时难觅i 2020-11-28 04:23

How can you achieve either a hover event or active event in ReactJS when you do inline styling?

I\'ve found that the onMouseEnter, onMouseLeave approach is buggy, so

13条回答
  •  借酒劲吻你
    2020-11-28 04:44

    Have you tried any of these?

    onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp

    SyntheticEvent

    it also mentions the following:

    React normalizes events so that they have consistent properties across different browsers.

    The event handlers below are triggered by an event in the bubbling phase. To register an event handler for the capture phase, append Capture to the event name; for example, instead of using onClick, you would use onClickCapture to handle the click event in the capture phase.

提交回复
热议问题