Permalink
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (7 sloc) 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.