Skip to content

fix: Fix crash on React Native 0.83+#295

Closed
wojtekmaj wants to merge 1 commit into
wcandillon:mainfrom
wojtekmaj:fix-rn-0.83
Closed

fix: Fix crash on React Native 0.83+#295
wojtekmaj wants to merge 1 commit into
wcandillon:mainfrom
wojtekmaj:fix-rn-0.83

Conversation

@wojtekmaj
Copy link
Copy Markdown

Closes #294

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a crash occurring on React Native 0.83+ by updating the method used to retrieve bounding rectangles. React Native 0.83+ removed the unstable_getBoundingClientRect() method in favor of the stable getBoundingClientRect() API.

Key Changes:

  • Replaced platform-specific checks with a feature detection approach to determine which bounding rectangle method to use
  • Simplified code by removing TypeScript error suppressions and multiple conditional branches

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wcandillon
Copy link
Copy Markdown
Owner

noo sorry I hadn't seen this PR, my apologies. I hope it's ok. just saw it now.

@wojtekmaj
Copy link
Copy Markdown
Author

No worries William! Thank you for your hard work on this package. <3

@wojtekmaj wojtekmaj deleted the fix-rn-0.83 branch December 18, 2025 21:17
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.

TypeError: viewRef.current.unstable_getBoundingClientRect is not a function (it is undefined)

3 participants