Skip to content

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

Merged
daniel-stoian-lgp merged 9 commits intodevelopfrom
feature/NXT-8995
Apr 8, 2026
Merged

NXT-8995: Adapt Agate code to respect React Compiler#854
daniel-stoian-lgp merged 9 commits intodevelopfrom
feature/NXT-8995

Conversation

@alexandrumorariu
Copy link
Copy Markdown
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
Copy Markdown

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 85.06%. Comparing base (71ed455) to head (b9c52aa).
⚠️ Report is 1 commits behind head on develop.

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.08%   85.06%   -0.02%     
===========================================
  Files          118      118              
  Lines         4491     4493       +2     
  Branches      1226     1226              
===========================================
+ Hits          3821     3822       +1     
- Misses         517      518       +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.

Comment thread useScroll/ScrollButtons.js
Copy link
Copy Markdown
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

Comment thread Scroller/useThemeScroller.js Outdated
Comment thread useScroll/Scrollbar.js Outdated
Comment thread VirtualList/useSpotlight.js Outdated
Comment thread useScroll/useScroll.js Outdated
# Conflicts:
#	samples/perf-virtuallist-native-with-different-item-size/src/views/HorizontalDifferentWidthItemList.js
#	samples/perf-virtuallist-native-with-different-item-size/src/views/VerticalDifferentHeightItemList.js
#	samples/perf-virtuallist-native-with-different-item-size/src/views/VerticalExpandableDifferentHeightItemList.js
@daniel-stoian-lgp daniel-stoian-lgp merged commit 4c8861f into develop Apr 8, 2026
8 checks passed
@daniel-stoian-lgp daniel-stoian-lgp deleted the feature/NXT-8995 branch April 8, 2026 08:11
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