1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Move getDisplayName to react-utility-belt

This commit is contained in:
Brett Sun 2016-07-04 15:25:28 +02:00
parent bf68efcd96
commit 1511f06504

10
js/utils/react.js vendored
View File

@ -1,7 +1,3 @@
/**
* Taken from react-router (https://github.com/reactjs/react-router/blob/master/modules/withRouter.js)
* FIXME: should be put into react-component's utils
*/
export function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
// Ignore error as we may have more exports in the future
// eslint-disable-next-line import/prefer-default-export
export { getDisplayName } from 'react-utility-belt/es6/utils/react';