Skip to content

Commit 89dbd48

Browse files
authored
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.
1 parent 87276ef commit 89dbd48

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ module.exports = {
496496
{
497497
files: [
498498
'packages/react-devtools-extensions/**/*.js',
499+
'packages/react-devtools-shared/src/devtools/views/**/*.js',
499500
'packages/react-devtools-shared/src/hook.js',
500501
'packages/react-devtools-shared/src/backend/console.js',
501502
'packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js',

packages/react-devtools-core/webpack.standalone.js

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ module.exports = {
8787
__EXTENSION__: false,
8888
__PROFILE__: false,
8989
__TEST__: NODE_ENV === 'test',
90+
__IS_NATIVE__: true,
9091
'process.env.DEVTOOLS_PACKAGE': `"react-devtools-core"`,
9192
'process.env.DEVTOOLS_VERSION': `"${DEVTOOLS_VERSION}"`,
9293
'process.env.EDITOR_URL': EDITOR_URL != null ? `"${EDITOR_URL}"` : null,

packages/react-devtools-fusebox/webpack.config.frontend.js

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ module.exports = {
8282
__EXTENSION__: false,
8383
__PROFILE__: false,
8484
__TEST__: NODE_ENV === 'test',
85+
__IS_NATIVE__: true,
8586
'process.env.DEVTOOLS_PACKAGE': `"react-devtools-fusebox"`,
8687
'process.env.DEVTOOLS_VERSION': `"${DEVTOOLS_VERSION}"`,
8788
'process.env.EDITOR_URL': EDITOR_URL != null ? `"${EDITOR_URL}"` : null,

packages/react-devtools-shared/src/devtools/views/Settings/ComponentsSettings.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ export default function ComponentsSettings({
477477
<option value={ElementTypeFunction}>function</option>
478478
<option value={ElementTypeForwardRef}>forward ref</option>
479479
<option value={ElementTypeHostComponent}>
480-
dom nodes (e.g. &lt;div&gt;)
480+
{__IS_NATIVE__
481+
? 'host components (e.g. &lt;RCTText&gt;)'
482+
: 'dom nodes (e.g. &lt;div&gt;)'}
481483
</option>
482484
<option value={ElementTypeMemo}>memo</option>
483485
<option value={ElementTypeOtherOrUnknown}>other</option>

0 commit comments

Comments
 (0)