-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Not working with forwardRef #161
Comments
Ok i've found the problem.
to the top of /// <reference types="@welldone-software/why-did-you-render" />
import React from 'react';
if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
trackAllPureComponents: true,
});
} |
Great, it works, thank you very much. |
somehow, it was adding the types automatically up until now. however, it seems like we need to add it manually in the latest typescript versions. I'm adding a section about it in the readme. thanks for noticing and reporting the problem! |
2 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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
The text was updated successfully, but these errors were encountered: