Created
September 13, 2019 07:51
-
-
Save Oleg-Sulzhenko/c67bcf64ff1226ab073b0665bcf0984c 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
By using the second argument of the Effect Hook with care, you can decide whether it runs: | |
every time (no argument) | |
only on mount and unmount ([] argument) | |
only when a certain variable changes (e.g. [count] argument) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment