How do you perform debounce in React.js?
I want to debounce the handleOnChange.
I tried with debounce(this.handleOnChange, 200) but it doesn\'t
debounce(this.handleOnChange, 200)
Lots of good info here already, but to be succinct. This works for me...
import React, {Component} from 'react'; import _ from 'lodash'; class MyComponent extends Component{ constructor(props){ super(props); this.handleChange = _.debounce(this.handleChange.bind(this),700); };