Skip to content

fix: avoid React 19 element.ref warning on web#911

Open
dohooo wants to merge 1 commit intomainfrom
caspian/fix-857-react19-web-warning-pr
Open

fix: avoid React 19 element.ref warning on web#911
dohooo wants to merge 1 commit intomainfrom
caspian/fix-857-react19-web-warning-pr

Conversation

@dohooo
Copy link
Copy Markdown
Owner

@dohooo dohooo commented Mar 30, 2026

Fixes #857
Also addresses #903

Description

  • remove the GestureDetector child ref from ScrollViewGesture
  • derive the non-loop overscroll limit from shared containerSize state instead of measure(containerRef)
  • add a dedicated React 19/web regression that simulates the upstream element.ref read and asserts the exact warning count stays at 0

Review

  • I self-reviewed this PR

Testing

  • I added/updated tests
  • I manually tested

Commands run in this branch:

  • yarn test --runInBand src/components/ScrollViewGesture.test.tsx
  • yarn types

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 30, 2026

⚠️ No Changeset found

Latest commit: cc14f6a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-reanimated-carousel Ready Ready Preview, Comment Mar 30, 2026 2:23am

Request Review

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.10%. Comparing base (fec99d7) to head (cc14f6a).

Files with missing lines Patch % Lines
src/components/ScrollViewGesture.tsx 0.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #911      +/-   ##
==========================================
- Coverage   84.32%   84.10%   -0.23%     
==========================================
  Files          37       37              
  Lines        1040     1038       -2     
  Branches      362      364       +2     
==========================================
- Hits          877      873       -4     
- Misses         67       68       +1     
- Partials       96       97       +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.

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

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"react-native-reanimated-carousel": "^5.0.0-beta.0",

1 participant