An open API service indexing awesome lists of open source software.

https://github.com/vlazh/react-outside-click-listener

Outside click listener for React
https://github.com/vlazh/react-outside-click-listener

component javascript outside outside-click outsideclick react typescript

Last synced: 3 months ago
JSON representation

Outside click listener for React

Awesome Lists containing this project

README

        

# Outside click listener for React

[![npm package](https://img.shields.io/npm/v/react-outside-click-listener.svg)](https://www.npmjs.org/package/react-outside-click-listener)

## Installation

```sh
npm install --save react-outside-click-listener
# or
yarn add react-outside-click-listener
```

## Usage example

```tsx
import { OutsideClickListener } from 'react-outside-click-listener';

function MyComponent() {
return (

{/* Child must hold a ref to dom node. */}


);
}
```