use-outside-click-hook (npm): React use outside click hook. It's a simple hook that allows you to detect clicks outside of a component.
Keywords: outside component click react|react outside click