Fix ref.current error during render initialization
Related to #30782
Update eslint-plugin-react-compiler to allow ref.current access during render for initialization.
-
Rule Update
- Modify
isReportableDiagnosticfunction to allowref.currentaccess during render for initialization. - Adjust
optionsobject to includeallowRefCurrentAccessDuringRender.
- Modify
-
Test Update
- Add a new valid test case for
ref.currentaccess during render for initialization. - Update the invalid test case to reflect the new rule.
- Add a new valid test case for
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-compiler-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 15, 2024 4:52pm |
Hi @vishwamartur!
Thank you for your pull request and welcome to our community.
Action Required
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.
Hi @vishwamartur, thanks for your contribution. This has already been fixed (see playground example).
In general, we prefer to land fixes to the core validation logic instead of ignoring specific lint strings.