Last active
December 2, 2020 07:16
-
-
Save chrisryana/c83ca33f74867ba5d5da05fac6ffd201 to your computer and use it in GitHub Desktop.
Шаблон навешивания событий с помощью useEffect
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(() => { | |
window.addEventListener('resize', getBlur); | |
return () => { | |
window.removeEventListener('resize', getBlur); | |
}; | |
// запустится один раз | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment