Skip to content

fix: defer ReactDevToolsOverlay import - #43690

Closed
hoxyq wants to merge 1 commit into
react:mainfrom
hoxyq:export-D55474774
Closed

fix: defer ReactDevToolsOverlay import#43690
hoxyq wants to merge 1 commit into
react:mainfrom
hoxyq:export-D55474774

Conversation

@hoxyq

Copy link
Copy Markdown
Contributor

Summary:

Changelog: [Internal]

Fixes#43678.

The issue is that once getInspectorDataForViewAtPoint is imported, it should throw if RDT global hook was not injected. ReactDevTools overlay imports getInspectorDataForViewAtPoint, this is why it did throw in testing environment.

ReactDevToolsOverlay JSX-element is already gated with RDT global hook check, adding a deferred import, same as it was already implemented for Inspector.

Still unclear to me how this didn't throw all this time while using the Catalyst / RNTester.

Differential Revision: D55474774

Summary:
# Changelog: [Internal]
Fixes#43678.
The issue is that once `getInspectorDataForViewAtPoint` is imported, it should throw if RDT global hook was not injected. ReactDevTools overlay imports `getInspectorDataForViewAtPoint`, this is why it did throw in testing environment.
ReactDevToolsOverlay JSX-element is already gated with RDT global hook check, adding a deferred import, same as it was already implemented for Inspector.
Still unclear to me how this didn't throw all this time while using the Catalyst / RNTester.
Differential Revision: D55474774
@facebook-github-botfacebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 28, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D55474774

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 4841373.

huntie pushed a commit that referenced this pull request Apr 2, 2024
Summary:
Pull Request resolved: #43690
# Changelog: [Internal]
Fixes#43678.
The issue is that once `getInspectorDataForViewAtPoint` is imported, it should throw if RDT global hook was not injected. ReactDevTools overlay imports `getInspectorDataForViewAtPoint`, this is why it did throw in testing environment.
ReactDevToolsOverlay JSX-element is already gated with RDT global hook check, adding a deferred import, same as it was already implemented for Inspector.
Still unclear to me how this didn't throw all this time while using the Catalyst / RNTester.
Reviewed By: cortinico
Differential Revision: D55474774
fbshipit-source-id: 759e5e8227cc7534193e5b95616b6099c15f5cb5
This was referenced Jun 28, 2024
@cipolleschicipolleschi mentioned this pull request Jul 22, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.fb-exportedMergedThis PR has been merged.p: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[0.74-rc.5] Modal component failed to render in runtime (iOS simu & Android emu) & tests (Test Renderer)

2 participants

@hoxyq@facebook-github-bot