this.onInputChange = this.onInputChange.bind(this) - > second this refer to instance of SearchBar which has existing function called onInputChange, now bind this function to this which is SearchBar and replace onInputChange with the new bound instance of this function.
Error-binding-context:
This error is result of not binding the event function to the instance of our class (SearchBar)
Fix:
this.onInputChange = this.onInputChange.bind(this) - > second this refer to instance of SearchBar which has existing function called onInputChange, now bind this function to this which is SearchBar and replace onInputChange with the new bound instance of this function.