Hi,
I have a problem with forwardRef and Typescript. Example below:
const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function headingFunction(
props: HeadingProps,
ref,
): ReactElement<HeadingProps, HeadingProps['tag']> | null {
...
});
Heading.whyDidYouRender = true;
And I get this error:
TS2339: Property 'whyDidYouRender' does not exist on type 'ForwardRefExoticComponent >'
Do you have any idea what to do with it?
Thank you
Hi,
I have a problem with forwardRef and Typescript. Example below:
And I get this error:
Do you have any idea what to do with it?
Thank you