<commit_before># React Outside Click

React component to track clicks that happened outside it. You just wrap the components you want to track if a click happened outside of them and ReactOutsideClick will execute a callback that you defined.

## How to install

    npm install react-outside-click

## How to use

Import the component to your project and then wrap the nodes you want to track if an outside click happened. Example:

    var React = require('react');
    var OutsideClick = require('react-outside-click');

    React.createClass({
      onOutsideClick: function (event) {<commit_msg>Add demo link to README<commit_after># React Outside Click

React component to track clicks that happened outside it. You just wrap the components you want to track if a click happened outside of them and ReactOutsideClick will execute a callback that you defined.

[Demo](http://felipethome.github.io/react-outside-click/)

## How to install

    npm install react-outside-click

## How to use

Import the component to your project and then wrap the nodes you want to track if an outside click happened. Example:

    var React = require('react');
    var OutsideClick = require('react-outside-click');

    React.createClass({
      onOutsideClick: function (event) {
{'fraction_non_alphanumeric': 0.06540583136327817, 'fraction_numerical': 0.0, 'mean_word_length': 4.019762845849803, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6451764', 'n_tokens_mistral': 326, 'n_tokens_neox': 309, 'n_words': 161}