Skip to content

Instantly share code, notes, and snippets.

@andyrichardson
Last active November 4, 2019 18:38
Show Gist options
  • Save andyrichardson/7a4f132b0aa0df1226b4b3e4f1a72638 to your computer and use it in GitHub Desktop.
Save andyrichardson/7a4f132b0aa0df1226b4b3e4f1a72638 to your computer and use it in GitHub Desktop.
// Trigger event
const handleClick = useCallback(() => fetch(url), []);
// Trigger change to render output
const handleClick = useCallback(() => setNewState(s => s+1), []);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment