Skip to content

Instantly share code, notes, and snippets.

Last active January 8, 2020 12:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
function ChildComponent({ value, setValue }) {
function makeApiCallRaw(value) {
console.log("make api call with value", value)
return (
onChange={e => {
setValue(; // Has to be non-debounced
makeApiCall( // has to be debounced
function App() {
const [value, setValue] = React.useState("");
return (
Hello World
<ChildComponent value={value} setValue={setValue} />
ReactDOM.render(<App />, document.getElementById("root"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment