@wana/babel-plugin-add-react-displayname
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

@wana/babel-plugin-add-react-displayname

Set the displayName property of your higher-order function components, using a Babel plugin! 🥳

  • Plain function components are skipped, since they have good support in React devtools.
  • Class components are not supported.

Forked from: opbeat/babel-plugin-add-react-displayname

Works with Babel 7.0.0+

Usage

npm install @wana/babel-plugin-add-react-displayname

And in .babelrc or whatever:

{
    "plugins": [
        "@wana/add-react-displayname"
    ]
}

Options

  • callees?: string[]

    Set the displayName of any component wrapped by one of these function names, even when the component doesn't return JSX.

Readme

Keywords

none

Package Sidebar

Install

npm i @wana/babel-plugin-add-react-displayname

Weekly Downloads

263

Version

1.0.7

License

MIT

Unpacked Size

15.3 kB

Total Files

7

Last publish

Collaborators

  • aleclarson