Created
February 25, 2021 08:02
-
-
Save rcdexta/f8ba7dd0ceb171807e47cc69991b9cdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import debounce from "lodash.debounce"; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { results: [] }; | |
this.onInput = debounce(this.onInput.bind(this), 500); | |
} | |
onInput = (e) => { | |
// same content... | |
}; | |
render() { | |
// same content... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment