i made some blocks with a mouseenter and mouseleave
<button onMouseEnter={this.MouseEnter}>hover</button>
MouseEnter(e) {
setTimeout(() => {
//check if mouse over still on this element
// do action
}, 600);
}
the problem is when i move the blocks very fast the last block detects the mouseenter before the timeout and do the action even if i'm not hovering on the block which is a bug, i want to make it the action run only after 500ms of hover on block.
p.s: i'm working with react.js