You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 10, 2023. It is now read-only.
Add ability to debounce invocation of the async function, using the debounce config option. Example:
asyncfunctionfetchRandomDog({ value }){constresponse=awaitaxios.get(`https://dog.ceo/api/breed/${value}/images/random);returnresponse;}exportdefaultfunctionRandomDog(){const[value,setValue]=React.useState('poodle');const{ isPending, isResolved, response }=useLoads('random-dog',fetchRandomDog,{debounce: 1000,variables: [{ value }]});return(<div><inputplaceholder="Search for a dog..."onChange={e=>setValue(e.target.value)}value={value}/>{isPending&&'Loading...'}{isResolved&&(<imgsrc={response.data.message}/>)}</div>)}