react-click-away-hook (npm): A React hook that runs when you click somewhere that isn't your component.
Keywords: react|hook|click away