Automatically detects and sets displayName for React components. This is useful for having real component names show up in production builds of React apps.
Babel already does this for React.createClass
style components, this adds support for the two other kinds of component definitions:
Simply add add-react-displayname
to your .babelrc
file:
{ "plugins": ["add-react-displayname"] }Doesn't work for decorated classes
If you are using the transform-decorators-legacy
plugin, make sure it's placed after this plugin in your plugin list.
npm test
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