diff --git a/packages/visx-bounds/src/enhancers/withBoundingRects.tsx b/packages/visx-bounds/src/enhancers/withBoundingRects.tsx index 840be1374..3fb655925 100644 --- a/packages/visx-bounds/src/enhancers/withBoundingRects.tsx +++ b/packages/visx-bounds/src/enhancers/withBoundingRects.tsx @@ -1,5 +1,5 @@ /* eslint react/no-did-mount-set-state: 0, react/no-find-dom-node: 0 */ -import React from 'react'; +import React, { ComponentClass } from 'react'; import ReactDOM from 'react-dom'; const emptyRect = { @@ -29,7 +29,7 @@ export type WithBoundingRectsProps = { export default function withBoundingRects( BaseComponent: React.ComponentType, -) { +): ComponentClass { return class WrappedComponent extends React.PureComponent { static displayName = `withBoundingRects(${BaseComponent.displayName || ''})`; node: HTMLElement | undefined | null;