Instantly share code, notes, and snippets.

View debounceTime-api-request
/*
Our HTML
<div id="results"></div><br />
<input id="input" type='text' />
*/
/*
Our API call
*/
const fetchQuery = search => {
return fetch(`https://www.reddit.com/r/${search}/.json?limit=10&show=all`)