Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Support for defaultProps will be removed" error after setting include: [/./] option #286

Closed
aktasmehmet opened this issue Jan 5, 2024 · 8 comments · Fixed by #300
Closed

Comments

@aktasmehmet
Copy link

In order to work WDYR with Next 13 and AppRouter without a problem, there is a workround (also mentioned here) to put include: [/./] to whyDidYouRender function.

When I did that, I started to get strange warnings/errors in the browser console which I never got before:

AppRouterAnnouncer: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Home: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

InnerLayoutRouter: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

...
Screenshot 2024-01-05 at 13 46 13

What might be the reason to this? When I remove include option, the errors are gone.

@Xamsix
Copy link

Xamsix commented Feb 16, 2024

@aktasmehmet I'm experiencing the same issue, did you find a workaround?

@aktasmehmet
Copy link
Author

@Xamsix unfortunately not :( Since this not a blocker issue for me, I kept going but yet I am still waiting for a solution to this.

@Nilegfx
Copy link

Nilegfx commented Jun 4, 2024

I am facing the same issue. any idea what it is and how can I solve/workaround it?

@aktasmehmet
Copy link
Author

Still waiting :(

@Hypnosphi
Copy link
Contributor

I can publish my fork to provide a temporary workaround

@Hypnosphi
Copy link
Contributor

Hypnosphi commented Jun 7, 2024

I can publish my fork to provide a temporary workaround

It's available now on npm as @hypnosphi/why-did-you-render. It includes the changes in #300

@Hypnosphi
Copy link
Contributor

@vzaidman can you please publish 8.0.3 to NPM?

@vzaidman
Copy link
Collaborator

vzaidman commented Jun 13, 2024

@Hypnosphi just did. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants