title: npm debounce failing in ReactJS
body: <p>Using <a href="https://www.npmjs.com/package/debounce" rel="nofollow noreferrer">npm debounce</a> I get an error with the following code in ReactJS. The error </p>
  
  <blockquote>
    <p>Javascript - Uncaught TypeError: Object(...) is not a function</p>
  </blockquote>
  
  <p>happens when the function is passed into debounce()</p>
  
  <pre><code>import React, { Component } from 'react';
  import { debounce } from 'debounce';
  
  class test extends Component {
       constructor(props) {
           super(props);
           this.state = {
               yolo: {}
           };
       }
  
       foobar(param) {
           debounce(() =&gt; {
               this.setState({yolo: param});
           }, 99);
       }
  
       render () {
           return (
               ...
               &lt;SomeComponent action={this.foobar.bind(this)} /&gt;
               ...
           );
       }
  }
  </code></pre>
  
  <p>I have tried some of the solutions mentioned in <a href="https://stackoverflow.com/questions/23123138/perform-debounce-in-react-js">Perform debounce in React.js</a>
  but none seem to work.</p>