fix(auth): include fetch in the retry callback deps - #57
Merged
Merged
Conversation
The React Compiler flagged the manual deps as not matching the inferred ones (missing fetch), skipping memoization optimization for the auth error component (react-hooks/preserve-manual-memoization error-level) plus an exhaustive-deps warning. Aligning the dependency array lets the compiler preserve its optimization.
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix (lint/compiler compliance). One-line dependency fix in apps/frontend/src/components/auth/register.tsx: the AuthErrorState retry useCallback now includes
fetchin its dependency array ([attempts, fetch]). No behavior change.Why was this change needed?
The eslint 9 SARIF pipeline (live since the eslint 9 migration) flagged the auth error component during the dev->main promote check: react-hooks/preserve-manual-memoization (error level - React Compiler skipped optimization because the inferred deps did not match the manually specified ones) plus an exhaustive-deps warning for the missing fetch reference. Aligning the deps resolves both and lets the compiler preserve its optimization.
Technical Details & Scope
Verification & Testing
QA
Checklist: