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

More relaxed displayName inference #3216

Merged
merged 1 commit into from
Dec 27, 2015
Merged

More relaxed displayName inference #3216

merged 1 commit into from
Dec 27, 2015

Conversation

sebmck
Copy link
Contributor

@sebmck sebmck commented Dec 27, 2015

Causes the displayName of:

var foo = bar(React.createClass({}));

to be inferred as foo despite not being the direct parent.

@sebmck
Copy link
Contributor Author

sebmck commented Dec 27, 2015

@spicyj What do you think of this change?

…e from rather than just checking the direct parent
@sebmck
Copy link
Contributor Author

sebmck commented Dec 27, 2015

cc @thejameskyle @gaearon

@sophiebits
Copy link
Contributor

Seems all right. I don't feel too strongly.

@jamiebuilds
Copy link
Contributor

👍

@codecov-io
Copy link

Current coverage is 85.16%

Merging #3216 into master will increase coverage by +0.02% as of 05896b8

@@            master   #3216   diff @@
======================================
  Files          215     215       
  Stmts        15640   15643     +3
  Branches      3344    3348     +4
  Methods          0       0       
======================================
+ Hit          13317   13322     +5
+ Partial        677     676     -1
+ Missed        1646    1645     -1

Review entire Coverage Diff as of 05896b8

Powered by Codecov. Updated on successful CI builds.

sebmck added a commit that referenced this pull request Dec 27, 2015
More relaxed `displayName` inference
@sebmck sebmck merged commit 082c785 into master Dec 27, 2015
@sebmck sebmck deleted the crawl-up-display-name branch December 27, 2015 21:58
@gaearon
Copy link
Member

gaearon commented Dec 27, 2015

Thank you!

@sebmck sebmck restored the crawl-up-display-name branch February 6, 2016 02:22
@sebmck sebmck deleted the crawl-up-display-name branch February 6, 2016 02:22
@colindresj
Copy link

This still appears be an issue for me using react-transform with react-transform-hmr and doing:

export default React.createClass({...})

Namely, don't seem to hit any of the statements here.

I'm on ^6.7.2 with react preset at ^6.5.0.

@klimashkin
Copy link

@colindresj Maybe this is your case also: gaearon/babel-plugin-react-transform#96

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants