Skip to content

Commit

Permalink
Add comment for not using useFocusEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Apr 3, 2024
1 parent eedf0fb commit ac6bb01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function WorkspaceMembersPage({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedEmployees, policy?.owner, session?.accountID]);

// useFocusEffect would make getWorkspaceMembers get called twice on fresh login because policyMember is a dependency of getWorkspaceMembers.
useEffect(() => {
if (!isFocused) {
return;
Expand Down

0 comments on commit ac6bb01

Please sign in to comment.