diff --git a/packages/react/src/profiler.tsx b/packages/react/src/profiler.tsx index d4c0f0a277e4..643ca818ca75 100644 --- a/packages/react/src/profiler.tsx +++ b/packages/react/src/profiler.tsx @@ -21,6 +21,8 @@ export type ProfilerProps = { includeRender?: boolean; // If component updates should be displayed as spans. True by default. includeUpdates?: boolean; + // Component that is being profiled. + children?: React.ReactNode; // props given to component being profiled. updateProps: { [key: string]: unknown }; }; @@ -120,7 +122,6 @@ class Profiler extends React.Component { } public render(): React.ReactNode { - // eslint-disable-next-line react/prop-types return this.props.children; } } @@ -136,7 +137,7 @@ class Profiler extends React.Component { function withProfiler

>( WrappedComponent: React.ComponentType

, // We do not want to have `updateProps` given in options, it is instead filled through the HOC. - options?: Pick, Exclude>, + options?: Pick, Exclude>, ): React.FC

{ const componentDisplayName = (options && options.name) || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;