Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 295 Bytes

getDisplayName.md

File metadata and controls

11 lines (7 loc) · 295 Bytes

getDisplayName()

Returns display name of a React component.

import getDisplayName from 'libreact/lib/util/getDisplayName';

const name = getDisplayName(MyComponent);

Accepts a single argument, which can be a stateful or stateless React component, or element. Returns a string.