-
Notifications
You must be signed in to change notification settings - Fork 87
displayName equals 'Constructor' #96
Comments
@gaearon Seems like I found why And this line in react-proxy use it as displayName, so all components become 'Constructor' I think new Firefox and Edge have the same issue |
How did it work before? I’m not sure what you expect to get because there is no way to infer a display name from |
As far as I can see, it used to not provide |
But what is |
As you can see from second message I use https://github.com/articulate/react-transform-display-name for creating DisplayName from filename |
https://github.com/articulate/react-transform-display-name is confusing to me because it seems to do what This Babel plugin does indeed seem to conflict with |
Without https://github.com/articulate/react-transform-display-name all my components are named like I knew about it here #19 (comment) |
And you are right, everything is fine if I remove babel |
If use
export default React.createClass({..})
,babel-plugin-react-transform
always set 'Constructor' as display name, and thenreact-transform-display-name
cant replace it with file name, because this constructionReactClass.displayName || basename(filename).replace(extname(filename), '')
always returns first one - Constructorhttps://github.com/articulate/react-transform-display-name/blob/master/src/index.js
So displayName just doesn't work now.
babel 6.7.6
The text was updated successfully, but these errors were encountered: