react-burger-menu icon indicating copy to clipboard operation
react-burger-menu copied to clipboard

NextJS warning message

Open ttsoares opened this issue 1 year ago • 7 comments

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)

ttsoares avatar Aug 27 '23 00:08 ttsoares

You can use it only in client component, so use

'use client'

sergromanov4 avatar Sep 07 '23 15:09 sergromanov4

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

fikkatra avatar Sep 13 '23 08:09 fikkatra

any possible solution?

Choco-milk-for-u avatar Sep 26 '23 13:09 Choco-milk-for-u

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.

ttsoares avatar Sep 26 '23 19:09 ttsoares

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?

davebm1 avatar Nov 16 '23 13:11 davebm1

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?

farukparhat avatar Jan 30 '24 20:01 farukparhat

I too am getting this warning message in NextJS 14.

tkoolhoven2 avatar May 15 '24 11:05 tkoolhoven2