Skip to content

alloc/babel-plugin-add-react-displayname

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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.

About

Set the displayName of your higher-order function components

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%