Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
behnammodi committed Aug 25, 2021
1 parent 3b6d37e commit 29ff8e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions text/0000-use-state-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}, []);
```

Expand Down

0 comments on commit 29ff8e6

Please sign in to comment.