Skip to content

Commit

Permalink
updated the examples to include the request function as a dependency …
Browse files Browse the repository at this point in the history
…of any useEffect calls
  • Loading branch information
aminnairi committed Nov 16, 2024
1 parent e548f61 commit 06a96ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/example/src/pages/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const UsersPage = (): ReactNode => {
return parsed
}
})
}, []);
}, [request]);

useEffect(() => {
getUsers();
Expand Down
2 changes: 1 addition & 1 deletion apps/example/src/pages/users/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const UserPage = (): ReactNode => {
return parsed;
}
});
}, [user]);
}, [request, user]);

useEffect(() => {
getUser();
Expand Down
2 changes: 1 addition & 1 deletion apps/example/src/pages/users/user/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const UsersUserPostsPage = (): ReactNode => {
return parsed;
}
});
}, []);
}, [request]);

const goTo = useCallback((path: string) => () => {
navigate(path)
Expand Down

0 comments on commit 06a96ec

Please sign in to comment.