I\'m trying to add debouncing with lodash to a search function, called from an input onChange event. The code below generates a type error \'function is expected\', which I unde
class MyComp extends Component { debounceSave; constructor(props) { super(props); } this.debounceSave = debounce(this.save.bind(this), 2000, { leading: false, trailing: true }); }
save() is the function to be called
debounceSave() is the function you actually call (multiple times).