Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-react-display-name

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-react-display-name

Add displayName to React.createClass calls

  • 6.25.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is babel-plugin-transform-react-display-name?

The babel-plugin-transform-react-display-name package is a Babel plugin that automatically adds display names to React components. This is particularly useful for debugging purposes, as it makes it easier to identify components in the React Developer Tools.

What are babel-plugin-transform-react-display-name's main functionalities?

Automatic Display Name Addition

This feature automatically adds a display name to React components, which helps in identifying the component in debugging tools. The plugin scans for React components and assigns a display name based on the variable or function name.

/* .babelrc configuration */
{
  "plugins": ["transform-react-display-name"]
}

/* Example React Component */
const MyComponent = () => <div>Hello World</div>;

/* After transformation */
const MyComponent = () => <div>Hello World</div>;
MyComponent.displayName = "MyComponent";

Other packages similar to babel-plugin-transform-react-display-name

Keywords

FAQs

Package last updated on 08 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc