Skip to content

NXT-8994: Adapted Enact code to respect React Compiler#3379

Open
ion-andrusciac-lgp wants to merge 10 commits intodevelopfrom
feature/NXT-8994
Open

NXT-8994: Adapted Enact code to respect React Compiler#3379
ion-andrusciac-lgp wants to merge 10 commits intodevelopfrom
feature/NXT-8994

Conversation

@ion-andrusciac-lgp
Copy link
Contributor

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

Adapted Enact code to respect React Compiler

Resolution

eslint-plugin-react-hooks 7.x has React Compiler embedded. The code needs to be adapted to respect Eslint rules

  • Adapted how the refs were changed during render, and also cannot read .current during render. This is not allowed outside handlers or effects REFERENCE
  • Modifying a variable defined outside a component or hook is not allowed
  • Modifying component props or hook arguments is not allowed
  • State update inside useEffect is not recommended

Additional Considerations

Some of the errors were silenced as they were considered false positives

Links

NXT-8994

Comments

Enact-DCO-1.0-Signed-off-by: Ion Andrusciac ion.andrusciac@lgepartner.com

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 82.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.18%. Comparing base (2011a8d) to head (50f7373).

Files with missing lines Patch % Lines
packages/core/util/util.js 14.28% 5 Missing and 1 partial ⚠️
packages/spotlight/Spottable/useSpottable.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3379      +/-   ##
===========================================
- Coverage    83.24%   83.18%   -0.06%     
===========================================
  Files          154      154              
  Lines         7258     7269      +11     
  Branches      1919     1921       +2     
===========================================
+ Hits          6042     6047       +5     
- Misses         956      961       +5     
- Partials       260      261       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@daniel-stoian-lgp daniel-stoian-lgp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@dan-ichim-lgp dan-ichim-lgp left a comment

Choose a reason for hiding this comment

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

LGTM, just double check useControlledState change.

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.

3 participants