A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gaearon/babel-plugin-react-transform/issues/19 below:

Loses displayName when using React.createClass · Issue #19 · gaearon/babel-plugin-react-transform · GitHub

This repository was archived by the owner on Apr 9, 2020. It is now read-only.

This repository was archived by the owner on Apr 9, 2020. It is now read-only.

Loses displayName when using React.createClass #19

Copy link Copy link

Closed

Closed

Loses displayName when using React.createClass#19

Copy link

Description glenjamin opened on Sep 14, 2015

Issue body actions

In the following code

var App = React.createClass({
  render: function() {
    return <div />;
  }
});

Babel (via https://github.com/babel/babel/tree/development/packages/babel-plugin-react-display-name) adds the displayName property based on the variable name.

However, this react-transform plugin doesn't seem to find these display names. Perhaps this is something to do with the ordering of the plugins?

I notice you have a test-case which confirms this behaviour - https://github.com/gaearon/babel-plugin-react-transform/blob/master/test/fixtures/classic/expected.js#L146 - was this intentional or just something that isn't yet supported?

Metadata Metadata

Assignees

No one assigned

Labels

No labels

No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests Issue actions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4