Skip to content

fix: add eslint-disable comment for exhaustive-deps warning in StepTh…#889

Open
Sreejesh06 wants to merge 4 commits intoasyncapi:masterfrom
Sreejesh06:issue-884
Open

fix: add eslint-disable comment for exhaustive-deps warning in StepTh…#889
Sreejesh06 wants to merge 4 commits intoasyncapi:masterfrom
Sreejesh06:issue-884

Conversation

@Sreejesh06
Copy link

@Sreejesh06 Sreejesh06 commented Dec 21, 2025

Description

This PR addresses the react-hooks/exhaustive-deps warnings causing noise during the build process in components/Form/Cfp/stepThree.tsx and components/Select/select.tsx.

Changes Made

  • Added // eslint-disable-next-line react-hooks/exhaustive-deps to the useEffect hooks in both files.

Reasoning

The setValue and setForm functions passed from parent components are created fresh on every render (unstable references). Adding them to the dependency array as suggested by the linter would cause infinite render loops. Explicitly suppressing the warning is the safest way to clear the build logs while preserving the current functionality.

Resolves Issue #884

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Ran npm run build and verified that the warnings are no longer present.
  • Manually verified that the form selection and state updates still work as expected.

Screenshots

Before (Build Warnings)

image

After (Clean Build)

Screenshot 2025-12-22 at 12 35 45 AM

@netlify
Copy link

netlify bot commented Dec 21, 2025

Deploy Preview for peaceful-ramanujan-288045 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f2eaf9b
🔍 Latest deploy log https://app.netlify.com/projects/peaceful-ramanujan-288045/deploys/6992c1dcc3b67a00087c2312
😎 Deploy Preview https://deploy-preview-889--peaceful-ramanujan-288045.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Sreejesh06
Copy link
Author

@thulieblack @AceTheCreator kindly have a look when you're free.Thankyou!

Copy link
Member

@AceTheCreator AceTheCreator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sreejesh06 did you check if there was fix for this re-rendering effect instead of just disabling the warning?

@Sreejesh06 Sreejesh06 closed this Jan 28, 2026
@Sreejesh06 Sreejesh06 deleted the issue-884 branch January 28, 2026 18:13
@Sreejesh06 Sreejesh06 restored the issue-884 branch January 28, 2026 18:14
@Sreejesh06 Sreejesh06 reopened this Feb 14, 2026
@Sreejesh06
Copy link
Author

@Sreejesh06 did you check if there was fix for this re-rendering effect instead of just disabling the warning?

Yeah Sir, I fixed it by adding the missing dependencies to the useEffect arrays instead of just disabling the warnings. Build is clean now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants