Skip to content

Conversation

@hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Dec 5, 2025

Follow-up to #34653.

React Native doesn't implement getClientRect, since this is applicable to CSS box, which is not a concept for Native (maybe yet).

I am loosening the condition that gates showOverlay() call to pass if getClientRect is not implemented.

Conceptually, everything that is inside react-devtools-shared/backend should be Host-agnostic, because both on Web and Native it is installed inside the Host JavaScript runtime, be it main frame of the page, or RN instance. Since overlay & highlighting logic also lives there, it should also follow these principles.

@hoxyq hoxyq requested review from eps1lon and sebmarkbage December 5, 2025 12:41
@meta-cla meta-cla bot added the CLA Signed label Dec 5, 2025
hoxyq added a commit that referenced this pull request Dec 5, 2025
Follow-up to #34641.
Similar to #35293,
#35294.

React DevTools backend can be used in non-DOM environments, so we have
to feature-check some DOM APIs.
For now I am just no-oping newly added commands for Native, we should
revisit this decision once we would roll out Suspense panel there, if
needed. I am not sure if scrolling will be required as much as it is
needed on Web.

`isReactNativeEnvironment()` check is kinda clowny, but we've been
relying on it for quite some time already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants