Skip to content

Instantly share code, notes, and snippets.

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