Last active
July 4, 2022 10:37
-
-
Save janpaepke/803681c8c5e6f59a584de3b0733cb97d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| useEffect(() => { | |
| const cleanup = reversibleTimeout(() => alert('one second has passed!'), 1000); | |
| return cleanup; | |
| }, []); | |
| // which we can simplify further to ⬇ | |
| useEffect(() => reversibleTimeout(() => alert('one second has passed!'), 1000), []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment