A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/welldone-software/why-did-you-render/issues/161 below:

Not working with forwardRef · Issue #161 · welldone-software/why-did-you-render · GitHub

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4