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

NextJS warning message #498

Open
ttsoares opened this issue Aug 27, 2023 · 7 comments
Open

NextJS warning message #498

ttsoares opened this issue Aug 27, 2023 · 7 comments

Comments

@ttsoares
Copy link

Warning: Menu: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at Menu (webpack-internal:///(ssr)/./node_modules/react-burger-menu/lib/menuFactory.js:60:46)
at div
at HamburgerMenu
at div
at nav
at BMenu
at Lazy
at div
at section
at body
at html
at RedirectErrorBoundary (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/redirect-boundary.js:72:9)
at RedirectBoundary (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/redirect-boundary.js:80:11)
at ReactDevOverlay (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js:66:9)
at HotReload (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js:343:11)
at Router (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/app-router.js:144:11)
at ErrorBoundaryHandler (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/error-boundary.js:82:9)
at ErrorBoundary (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/error-boundary.js:109:11)
at AppRouter (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/app-router.js:403:13)
at Lazy
at Lazy
at ServerComponentWrapper (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/server/app-render/create-server-components-renderer.js:78:31)
at ServerComponentWrapper (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/server/app-render/create-server-components-renderer.js:78:31)
at ServerInsertedHTMLProvider (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/server/app-render/server-inserted-html.js:26:39)
Warning: Invalid DOM property fill-rule. Did you mean fillRule?
at g
at svg
at div
at HamburgerIcon
at div
at BurgerIcon (webpack-internal:///(ssr)/./node_modules/react-burger-menu/lib/components/BurgerIcon.js:31:5)
at div
at div
at Menu (webpack-internal:///(ssr)/./node_modules/react-burger-menu/lib/menuFactory.js:60:46)
at div
at HamburgerMenu
at div
at nav
at BMenu
at Lazy
at div
at section
at body
at html
at RedirectErrorBoundary (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/redirect-boundary.js:72:9)
at RedirectBoundary (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/redirect-boundary.js:80:11)
at ReactDevOverlay (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js:66:9)
at HotReload (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js:343:11)
at Router (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/app-router.js:144:11)
at ErrorBoundaryHandler (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/error-boundary.js:82:9)
at ErrorBoundary (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/error-boundary.js:109:11)
at AppRouter (webpack-internal:///(ssr)/./node_modules/next/dist/client/components/app-router.js:403:13)
at Lazy
at Lazy
at ServerComponentWrapper (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/server/app-render/create-server-components-renderer.js:78:31)
at ServerComponentWrapper (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/server/app-render/create-server-components-renderer.js:78:31)
at ServerInsertedHTMLProvider (/extra/frontendmentor.io/urlshorter/node_modules/next/dist/server/app-render/server-inserted-html.js:26:39)

@sergromanov4
Copy link

You can use it only in client component, so use

'use client'

@fikkatra
Copy link

Possible duplicate of #488
@sergromanov4 marking it as a client component, doesn't remove the console warning

@Choco-milk-for-u
Copy link

any possible solution?

@ttsoares
Copy link
Author

Several other libraries are showing this same message with NextJS 13. For now I've been ignoring it OR migrate to a custom hand-made solution as I did with this burger menu.

@davebm1
Copy link

davebm1 commented Nov 16, 2023

I'm also getting this warning (with NextJS 14). If support for defaultProps is being removed, surely the answer is for the devs to implement JavaScript default parameters, as recommended in the warning message?

@farukparhat
Copy link

Several other libraries are showing this same message with NextJS 13. For now I've been ignoring it OR migrate to a custom hand-made solution as I did with this burger menu.

Are you still using parts of this library or just rewrote everything from scratch?

Is there a fork of this library where the warning has been addressed?

@tkoolhoven2
Copy link

I too am getting this warning message in NextJS 14.

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

No branches or pull requests

7 participants