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

Component display name fixes for Apollo examples #2211

Merged
merged 3 commits into from
Jul 1, 2017

Conversation

jaydenseric
Copy link
Contributor

For the Apollo examples, the displayName of the widthData decorated component breaks when using anonymous or named stateless components.

Before

Anonymous stateless page component:

screen shot 2017-06-09 at 3 13 49 pm

Named stateless page component:

screen shot 2017-06-09 at 3 15 07 pm

After

Anonymous stateless page component:

screen shot 2017-06-09 at 3 07 50 pm

Named stateless page component:

screen shot 2017-06-09 at 3 16 15 pm

@timneutkens
Copy link
Member

Just implemented the same function as used in the core: #2286. After travis is done building I'll merge 👍

@jaydenseric
Copy link
Contributor Author

jaydenseric commented Jun 28, 2017

@timneutkens that other implementation came later than this PR but for some reason didn't factor in anonymous functions and won't result in the anonymous stateless page component "after" screenshot. In the inspector it would look like <WithData() serverState= instead of <WithData(Unknown) serverState=; inconsistent with how unnamed functions appear as Unknown everywhere else in the React inspector.

@timneutkens
Copy link
Member

Just tested this. It works as expected 😄

@timneutkens timneutkens merged commit 9bbdfec into vercel:master Jul 1, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jul 1, 2018
@jaydenseric jaydenseric deleted the display-name-fix branch May 15, 2019 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants