Skip to content

Instantly share code, notes, and snippets.

@felipefunes
Last active March 5, 2019 21:07
Show Gist options
  • Save felipefunes/b8f83ed4879865f3e2e55aa21e3f7723 to your computer and use it in GitHub Desktop.
Save felipefunes/b8f83ed4879865f3e2e55aa21e3f7723 to your computer and use it in GitHub Desktop.
useEffect(() => {
// Do something
}, [firstValue, secondValue]);
// "Do something" will be executed
// every time that firstValue OR secondValue change
// because if any value change we are getting a different array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment