Skip to content

NXT-8995: Adapt Agate code to respect React Compiler#854

Open
alexandrumorariu wants to merge 5 commits intodevelopfrom
feature/NXT-8995
Open

NXT-8995: Adapt Agate code to respect React Compiler#854
alexandrumorariu wants to merge 5 commits intodevelopfrom
feature/NXT-8995

Conversation

@alexandrumorariu
Copy link
Contributor

@alexandrumorariu alexandrumorariu commented Jan 29, 2026

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 Agate 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
  • Refs.current cannot be used in dependency array
  • 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 (future investigation may be required)

Links

NXT-8995

Comments

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 85.18519% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.98%. Comparing base (e439cea) to head (1b54cf6).

Files with missing lines Patch % Lines
Scroller/useThemeScroller.js 16.66% 5 Missing ⚠️
VirtualList/useSpotlight.js 33.33% 2 Missing ⚠️
useScroll/ScrollButtons.js 96.55% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #854      +/-   ##
===========================================
- Coverage    85.00%   84.98%   -0.02%     
===========================================
  Files          118      118              
  Lines         4435     4437       +2     
  Branches      1226     1226              
===========================================
+ Hits          3770     3771       +1     
- Misses         512      513       +1     
  Partials       153      153              

☔ 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

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