Pomax/react-onclickoutside

Request for documentation: how this component works under the hood

srcreigh opened this issue · 1 comments

Hi, I would like to understand how this component works before using it. I scanned the README and didn't see anything which explains the internals. For example, does it attach a reference to document? Does it attach a child element that covers the entire parent view beneath the wrapped component?

I understand that I can read the code to see how this works, and I may do that, however I did expect to find it in the documentation. Thank you.

Pomax commented

It's not in the REAMDE.md mostly because that's exactly the kind of thing you shouldn't need to know in order to use it, As a browser document HOC, it relies on document and the component-associated DOM node in that document, with ancestor traversal to determine whether the component DOM node is part of the click event chain or not.