airbnb/react-outside-click-handler

feature: Hook version

baleeds opened this issue · 1 comments

I've implemented this as a hook if you're interested in a PR?

useOutsideClickHandler(ref, handleOutsideClick, {
  useCapture: false,
  disabled: false,
});

It'd be reasonable to add as an additional entry point, as long as it had good tests, and it explicitly threw when someone required/imported it and the right version of React wasn't available.