babel-plugin-transform-create-class-display-name

0.2.0 • Public • Published

babel-transform-create-class-display-name

It would appear that one of the differences between React.createClass and create-react-class is that the latter will no longer implictly add a displayName to the Component.

You might see <Unknown> in the react-devtools as a consequence.

This babel plugin will implicitly transform

const Foo = reactCreateClass({
 
})

into

const Foo = reactCreateClass({
 
  displayName : 'Foo'
 
})

/babel-plugin-transform-create-class-display-name/

    Package Sidebar

    Install

    npm i babel-plugin-transform-create-class-display-name

    Weekly Downloads

    2

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • decoy9697