Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix View/Text displayName #21950

Closed

Conversation

rajivshah3
Copy link
Contributor

@rajivshah3 rajivshah3 commented Oct 25, 2018

Adds the displayName prop to View and Text components. Because these now use React.forwardRef, they were showing as Component instead of their actual names.

Thanks to @ljharb for helping to pinpoint the source of the issue!

Fixes #21937

Test Plan:

Snapshot test for YellowBoxCategory should pass

Release Notes:

[GENERAL] [BUGFIX] [View] - Add displayName prop to View components
[GENERAL] [BUGFIX] [Text] - Add displayName prop to Text components

@rajivshah3 rajivshah3 requested a review from shergin as a code owner October 25, 2018 16:55
@facebook-github-bot facebook-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 Oct 25, 2018
@rajivshah3
Copy link
Contributor Author

Could we also restore the defaultProps? It seems like these no longer show up in snapshot tests: e708010#r31046472

@rajivshah3 rajivshah3 changed the title [WIP] Fix View/Text displayName Fix View/Text displayName Oct 25, 2018
@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Oct 29, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@rajivshah3 merged commit 7a914fc into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 29, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 29, 2018
@rajivshah3 rajivshah3 deleted the fix/view-text-forwardref branch October 31, 2018 04:22
kelset pushed a commit that referenced this pull request Nov 9, 2018
Summary:
Adds the displayName prop to `View` and `Text` components. Because these now use `React.forwardRef`, they were showing as `Component` instead of their actual names.

Thanks to ljharb for helping to pinpoint the source of the issue!

Fixes #21937
Pull Request resolved: #21950

Differential Revision: D12827060

Pulled By: TheSavior

fbshipit-source-id: d812cae14d53ad821ab5873e737db63ad1a989e3
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
Adds the displayName prop to `View` and `Text` components. Because these now use `React.forwardRef`, they were showing as `Component` instead of their actual names.

Thanks to ljharb for helping to pinpoint the source of the issue!

Fixes facebook#21937
Pull Request resolved: facebook#21950

Differential Revision: D12827060

Pulled By: TheSavior

fbshipit-source-id: d812cae14d53ad821ab5873e737db63ad1a989e3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants