react-relay
Version:
A framework for building GraphQL-driven React applications.
26 lines (21 loc) • 571 B
Flow
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
* @oncall relay
*/
;
function getComponentName(component: component(...empty)): string {
return component.displayName || component.name || 'Component';
}
function getContainerName(Component: component(...empty)): string {
return 'Relay(' + getComponentName(Component) + ')';
}
module.exports = {
getComponentName,
getContainerName,
};