ref(tsc): projectTeams endpoint to apiOptions#113063
Conversation
Sentry Snapshot Testing
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 579fdef. Configure here.
| ); | ||
| }, | ||
| [api, orgSlug, projectSlug, cursor, queryClient] | ||
| [api, orgSlug, projectSlug, queryKey, queryClient] |
There was a problem hiding this comment.
useCallback memoization broken by unstable queryKey reference
Low Severity
projectTeamsApiOptions() is called at render time, producing a new queryKey array reference on every render. Since React's useCallback uses Object.is for dependency comparison, the queryKey dependency always differs, causing the callback to be recreated every render. The old code used primitive cursor as a dependency, which compared stably. The callbacks are passed directly as onRemoveTeam and onCreateTeam props, so this causes unnecessary child re-renders on every parent render.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 579fdef. Configure here.
There was a problem hiding this comment.
well then let’s just remove it: 0f6b667


No description provided.