fix[DevTools]: fix HostComponent naming in filters for Native (#32086)

Right now we mention DOM elements as Host elements for React Native,
which doesn't make sense.
This commit is contained in:
Ruslan Lesiutin 2025-01-16 14:17:06 +00:00 committed by GitHub
parent 87276ef1ef
commit 89dbd487fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 1 deletions

View File

@ -496,6 +496,7 @@ module.exports = {
{
files: [
'packages/react-devtools-extensions/**/*.js',
'packages/react-devtools-shared/src/devtools/views/**/*.js',
'packages/react-devtools-shared/src/hook.js',
'packages/react-devtools-shared/src/backend/console.js',
'packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js',

View File

@ -87,6 +87,7 @@ module.exports = {
__EXTENSION__: false,
__PROFILE__: false,
__TEST__: NODE_ENV === 'test',
__IS_NATIVE__: true,
'process.env.DEVTOOLS_PACKAGE': `"react-devtools-core"`,
'process.env.DEVTOOLS_VERSION': `"${DEVTOOLS_VERSION}"`,
'process.env.EDITOR_URL': EDITOR_URL != null ? `"${EDITOR_URL}"` : null,

View File

@ -82,6 +82,7 @@ module.exports = {
__EXTENSION__: false,
__PROFILE__: false,
__TEST__: NODE_ENV === 'test',
__IS_NATIVE__: true,
'process.env.DEVTOOLS_PACKAGE': `"react-devtools-fusebox"`,
'process.env.DEVTOOLS_VERSION': `"${DEVTOOLS_VERSION}"`,
'process.env.EDITOR_URL': EDITOR_URL != null ? `"${EDITOR_URL}"` : null,

View File

@ -477,7 +477,9 @@ export default function ComponentsSettings({
<option value={ElementTypeFunction}>function</option>
<option value={ElementTypeForwardRef}>forward ref</option>
<option value={ElementTypeHostComponent}>
dom nodes (e.g. &lt;div&gt;)
{__IS_NATIVE__
? 'host components (e.g. &lt;RCTText&gt;)'
: 'dom nodes (e.g. &lt;div&gt;)'}
</option>
<option value={ElementTypeMemo}>memo</option>
<option value={ElementTypeOtherOrUnknown}>other</option>