Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 465 Bytes

getcomponentname.md

File metadata and controls

28 lines (18 loc) · 465 Bytes

getComponentName

Retrieves the name of a React component.

Arguments

Argument Type Description
Component React.Component A React component.

Returns

string: The name of a React component.

Examples

import React from 'react'
import getComponentName from '@helpscout/react-utils/dist/getComponentName'

class UncleRico extends React.Component {
  ...
}

getComponentName(UncleRico)
// UncleRico