Skip to content

Commit

Permalink
feat: add dependency ro useEffect in App.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nullist0 committed May 26, 2021
1 parent c00b987 commit 926792c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
22 changes: 1 addition & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function CountResult({ counter, range }) {
setCount(cache);
};
handleRange();
}, [range]);
}, [counter, range]);

return (
<p data-testid='result'>{count}</p>
Expand Down

0 comments on commit 926792c

Please sign in to comment.