Created
March 7, 2020 08:48
-
-
Save DennyScott/616a3234df2bf139a8d7fe9ccc657639 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ExampleComponent({url}) { | |
const fetchData = useCallback(() => { | |
// fetch call here | |
}, [url]); | |
useEffect(() => fetchData(), [fetchData]); | |
return (<div></div>); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment