higher-order-components
higher-order-components copied to clipboard
Fix `withHoverProps` using `onMouseEnter` and `onMouseLeave`
Because onMouseOver
and onMouseOut
bubbles up to the DOM triggering unnecessary re-renders every time you hover on any children of wrapped with this HOC component. onMouseEnter
and onMouseLeave
stops this madness and works just like "hover".
See https://api.jquery.com/mouseenter/ and https://api.jquery.com/mouseleave/ for further details.
This is a breaking change because we need to change props mapping in every wrapped component (if it's not in {...props}
ofc).
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.