Skip to content

Instantly share code, notes, and snippets.

@DennyScott
Created March 7, 2020 08:44
Show Gist options
  • Save DennyScott/2797fe4d5f155afc7aa51bf9ae47bc47 to your computer and use it in GitHub Desktop.
Save DennyScott/2797fe4d5f155afc7aa51bf9ae47bc47 to your computer and use it in GitHub Desktop.
function ExampleComponent({url}) {
const fetchData = (url) => {
// fetch call here
}
useEffect(() => fetchData(url), [url, fetchData]);
return (<div></div>);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment