Use getDisplayName from recompose

This commit is contained in:
Chi Vinh Le
2017-05-05 22:40:54 +07:00
parent f509d29a94
commit 8b3f69d964
+1 -4
View File
@@ -1,11 +1,8 @@
import React from 'react';
import {getDisplayName} from 'recompose';
// TODO: revisit `filtering` after https://github.com/apollographql/graphql-anywhere/issues/38.
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
export default fragments => WrappedComponent => {
class WithFragments extends React.Component {
render() {