0.2.0 • Published 7 years ago

babel-plugin-transform-create-class-display-name v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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'

})