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

Open
aktasmehmet opened this issue Jan 5, 2024 · 2 comments · May be fixed by #300
Open

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

aktasmehmet opened this issue Jan 5, 2024 · 2 comments · May be fixed by #300

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.

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