diff --git a/text/0000-use-state-ref.md b/text/0000-use-state-ref.md index 7d1ed894..aa53937d 100644 --- a/text/0000-use-state-ref.md +++ b/text/0000-use-state-ref.md @@ -16,13 +16,13 @@ that's mean whenever `count` changes we don't need to perform `useEffect` effect const [count, setCount, getCount] = useStateRef(); useEffect(() => { - const handleVisibiltuy = () => { + const handleVisibility = () => { console.log(getCount()); }; - document.addEventListener('visibilitychange', handleVisibiltuy); + document.addEventListener('visibilitychange', handleVisibility); - return () => document.removeEventListener('visibilitychange', handleVisibiltuy); + return () => document.removeEventListener('visibilitychange', handleVisibility); }, []); ```