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.

results matching ""

    No results matching ""