Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
babel-plugin-transform-react-stateless-component-name
Advanced tools
A babel plugin to add name for default exported stateless components.
Adds a display name to the stateless component in the React Dev Tools.
Note: Now will add displayName property to functions as well to help with Snapshot testing.
// App.jsx
import React from 'react'
export default () => (
<h1>Hello World!</h1>
)
// index.js
import App from './App'
import React from 'react'
import { render } from 'react-dom'
render(<App />, document.getElementById('root'))
$ yarn add --dev babel-plugin-transform-react-stateless-component-name
$ npm install --save-dev babel-plugin-transform-react-stateless-component-name
.babelrc
(Recommended).babelrc
{
"plugins": [
"transform-react-stateless-component-name"
]
}
$ babel --plugins transform-react-stateless-component-name script.js
require('babel-core').transform('code', {
plugins: [
'transform-react-stateless-component-name',
],
})
673e2a4128
] - Update to use write-changelog
package (Neil Kistner)a853f804b1
] - Remove all istanbul ignores (#10) (Thomas Grainger)e875edd575
] - Avoid crash on block-arrow components with hoc wrapper (#9) (Thomas Grainger)e98586fe5a
] - Ignore JSX Expression blocks (#7) (Daniel J)Copyright © 2015-2016 Neil Kistner
Released under the MIT license. See license for details.
v1.1.2 (2017-11-07)
673e2a4128
] - Update to use write-changelog
package (Neil Kistner)a853f804b1
] - Remove all istanbul ignores (#10) (Thomas Grainger)e875edd575
] - Avoid crash on block-arrow components with hoc wrapper (#9) (Thomas Grainger)e98586fe5a
] - Ignore JSX Expression blocks (#7) (Daniel J)FAQs
A babel plugin to add name for default exported stateless components.
The npm package babel-plugin-transform-react-stateless-component-name receives a total of 314 weekly downloads. As such, babel-plugin-transform-react-stateless-component-name popularity was classified as not popular.
We found that babel-plugin-transform-react-stateless-component-name demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.