Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Hack around displayName issues in FB products (Simple) #483

Merged
merged 3 commits into from
Feb 2, 2017

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Feb 2, 2017

Same purpose as #482, but much less hacky.

This will work best, but it requires that we also move ReactComponent and ReactPureComponent exports behind an object so that they don't get a displayName internally (facebook/react#8918).

if (componentName && moduleName) {
if (
moduleName === componentName ||
moduleName.startsWith(componentName + '.')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is ES6 but we use WeakMap already everywhere so I assume it's fine

@gaearon
Copy link
Contributor Author

gaearon commented Feb 2, 2017

#movefast

@gaearon gaearon merged commit 92bea89 into facebook:master Feb 2, 2017
@gaearon gaearon deleted the displayname-simple branch February 2, 2017 20:28
pastelsky pushed a commit to pastelsky/react-devtools that referenced this pull request Feb 25, 2017
* Hack around displayName issues in FB products

* Catch more cases

* Remove the base class hack
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants