Skip to content

Commit

Permalink
Revert "put variable change inside useEffect"
Browse files Browse the repository at this point in the history
This reverts commit 132eda3.
  • Loading branch information
binsmyth authored and aarongarciah committed Sep 12, 2024
1 parent 6b11060 commit cd0f9fa
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ describe('usePagination', () => {
const renderHook = (useHook) => {
const result = {};
function TestCase() {
const hookResult = useHook();
React.useEffect(() => {
result.current = hookResult;
}, [hookResult]);
result.current = useHook();
return null;
}
render(<TestCase />);
Expand Down

0 comments on commit cd0f9fa

Please sign in to comment.