babel-plugin-transform-react-display-name
Add displayName to
createReactClass
(andReact.createClass
) calls
Example
In
var foo = React; // React <= 15var bar = ; // React 16+
Out
var foo = React; // React <= 15var bar = ; // React 16+
Installation
npm install --save-dev babel-plugin-transform-react-display-name
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
babel --plugins transform-react-display-name script.js
Via Node API
;