Skip to content

Conversation

filip131311
Copy link
Contributor

@filip131311 filip131311 commented Jul 17, 2025

Summary:

Hello, I work on Radon IDE I encountered an issue while adding support for react native 81, this PR solves it:
In #51023 @EvanBacon removed displayName filed from View component adding the following comment:

Remove displayName in favor of component name. I'm not 100% sure this is a full fallback but it is valid according to react/display-name eslint rule—https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md

Unfortunately the Fabric renderer uses the displayName property to generate the name of the component for the inspector functionality and in absence of it generates a name that might be confusing to the end user:

Screenshot 2025-07-17 at 21 27 37

Problem is not specific to Radon and happens in chrome devtools as well:

Screenshot 2025-07-17 at 22 16 52

This PR brings back the displayName property to fix that.

Changelog:

[INTERNAL] [FIXED] - Bring back the displayName property to the View component

Test Plan:

  • Run the application
  • open chrome devtools and navigate to "components" tab
  • before changes the View components would show up as View_withRef after they are named View

@meta-cla meta-cla 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 Jul 17, 2025
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 17, 2025
@facebook-github-bot
Copy link
Contributor

@alanleedev has imported this pull request. If you are a Meta employee, you can view this in D78512254.

filip131311 added a commit to software-mansion/radon-ide that referenced this pull request Jul 18, 2025
This PR adds support for react native 81:

- replaces the renderer for the version that provides information about
component sources
- defines internal imports from react native for the new version

note:
when testing the new version of react native we came across a problem
with the inspector, that requires a fix in the RN core, We opened a
[pull request ](facebook/react-native#52688) to
mitigate that

### How Has This Been Tested: 

- run and play with `react-native-81` test app that was added to test
apps
@react-native-bot
Copy link
Collaborator

react-native-bot commented Jul 21, 2025


Warnings
⚠️ ❗ JavaScript API change detected - This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API. Please include a clear changelog message. This change will be subject to extra review.

This change was flagged as: BREAKING

Generated by 🚫 dangerJS against 0afbd56

@facebook-github-bot
Copy link
Contributor

@alanleedev has imported this pull request. If you are a Meta employee, you can view this in D78512254.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 24, 2025
@facebook-github-bot
Copy link
Contributor

@alanleedev merged this pull request in 5ef4106.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @filip131311 in 5ef4106

When will my fix make it into a release? | How to file a pick request?

@alanleedev
Copy link
Contributor

@filip131311 Thanks for the fix. This was just merged and we have a pick request for 0.81 here; reactwg/react-native-releases#1060

@filip131311
Copy link
Contributor Author

Thanks!

motiz88 pushed a commit to motiz88/react-native that referenced this pull request Jul 28, 2025
Summary:
Hello, I work on [Radon IDE](ide.swmansion.com) I encountered an issue while adding support for react native 81, this PR solves it:
In facebook#51023 EvanBacon removed `displayName` filed from `View` component adding the following comment:
>Remove displayName in favor of component name. I'm not 100% sure this is a full fallback but it is valid according to react/display-name eslint rule—https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md

Unfortunately the Fabric renderer uses the `displayName` property to generate the name of the component for the inspector functionality and in absence of it generates a name that might be confusing to the end user:

<img width="351" height="283" alt="Screenshot 2025-07-17 at 21 27 37" src="https://github.com/user-attachments/assets/852246aa-6586-4684-b80e-5d70b9678c6e" />

Problem is not specific to Radon and happens in chrome devtools as well:

<img width="501" height="130" alt="Screenshot 2025-07-17 at 22 16 52" src="https://github.com/user-attachments/assets/3514dd02-59f7-473a-87b1-6ed325d2034c" />

This PR brings back the `displayName` property to fix that.

[INTERNAL] [FIXED] - Bring back the displayName property to the View component

Pull Request resolved: facebook#52688

Test Plan:
- Run the application
- open chrome devtools and navigate to "components" tab
- before changes the View components would show up as `View_withRef` after they are named `View`

Rollback Plan:

Reviewed By: lunaleaps, cortinico

Differential Revision: D78512254

Pulled By: alanleedev

fbshipit-source-id: 46e4a224b09fe3fb938c055a675f687c86d7ddcb
motiz88 added a commit that referenced this pull request Jul 28, 2025
Summary:
Hello, I work on [Radon IDE](ide.swmansion.com) I encountered an issue while adding support for react native 81, this PR solves it:
In #51023 EvanBacon removed `displayName` filed from `View` component adding the following comment:
>Remove displayName in favor of component name. I'm not 100% sure this is a full fallback but it is valid according to react/display-name eslint rule—https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md

Unfortunately the Fabric renderer uses the `displayName` property to generate the name of the component for the inspector functionality and in absence of it generates a name that might be confusing to the end user:

<img width="351" height="283" alt="Screenshot 2025-07-17 at 21 27 37" src="https://github.com/user-attachments/assets/852246aa-6586-4684-b80e-5d70b9678c6e" />

Problem is not specific to Radon and happens in chrome devtools as well:

<img width="501" height="130" alt="Screenshot 2025-07-17 at 22 16 52" src="https://github.com/user-attachments/assets/3514dd02-59f7-473a-87b1-6ed325d2034c" />

This PR brings back the `displayName` property to fix that.

[INTERNAL] [FIXED] - Bring back the displayName property to the View component

Pull Request resolved: #52688

Test Plan:
- Run the application
- open chrome devtools and navigate to "components" tab
- before changes the View components would show up as `View_withRef` after they are named `View`

Rollback Plan:

Reviewed By: lunaleaps, cortinico

Differential Revision: D78512254

Pulled By: alanleedev

fbshipit-source-id: 46e4a224b09fe3fb938c055a675f687c86d7ddcb

Co-authored-by: filip131311 <159789821+filip131311@users.noreply.github.com>
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @motiz88 in b58e5fa

When will my fix make it into a release? | How to file a pick request?

kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
Summary:
Hello, I work on [Radon IDE](ide.swmansion.com) I encountered an issue while adding support for react native 81, this PR solves it:
In facebook#51023 EvanBacon removed `displayName` filed from `View` component adding the following comment:
>Remove displayName in favor of component name. I'm not 100% sure this is a full fallback but it is valid according to react/display-name eslint rule—https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md

Unfortunately the Fabric renderer uses the `displayName` property to generate the name of the component for the inspector functionality and in absence of it generates a name that might be confusing to the end user:

<img width="351" height="283" alt="Screenshot 2025-07-17 at 21 27 37" src="https://github.com/user-attachments/assets/852246aa-6586-4684-b80e-5d70b9678c6e" />

Problem is not specific to Radon and happens in chrome devtools as well:

<img width="501" height="130" alt="Screenshot 2025-07-17 at 22 16 52" src="https://github.com/user-attachments/assets/3514dd02-59f7-473a-87b1-6ed325d2034c" />

This PR brings back the `displayName` property to fix that.

## Changelog:

[INTERNAL] [FIXED] - Bring back the displayName property to the View component

Pull Request resolved: facebook#52688

Test Plan:
- Run the application
- open chrome devtools and navigate to "components" tab
- before changes the View components would show up as `View_withRef` after they are named `View`

Rollback Plan:

Reviewed By: lunaleaps, cortinico

Differential Revision: D78512254

Pulled By: alanleedev

fbshipit-source-id: 46e4a224b09fe3fb938c055a675f687c86d7ddcb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants