@rcp/util.displayname
v2.0.0
Published
The utility for getting display name
Downloads
11
Readme
@rcp/util.displayname
The utility for getting display name
Installation
npm install @rcp/util.displayname
# or use yarn
yarn add @rcp/util.displayname
Usage
import displayName from '@rcp/util.displayname'
class A extends React.Component {}
displayName(A) === 'A'
class Foo extends React.Component {
static displayName = 'FooFoo'
}
displayName(Foo) === 'FooFoo'
API
displayName
The utility for getting display name
Parameters
component
(React.ComponentType | React.ReactElement<any> | IFunction | string)
Returns string
Authors
This library is written and maintained by imcuttle, [email protected].
License
MIT