🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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
Version published
Weekly downloads
631K
18.7%
Maintainers
4
Weekly downloads
 
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

babel-plugin

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