geist-ui
geist-ui copied to clipboard
Default Props Warning
Bug report 🐞
Version & Environment
- Version of browser: N/A
- Version of
geist-ui/core: 2.3.8
Expected Behaviour
The behavior I expect is no warning
Actual results (or Errors)
I got an error:
Warning: GeistBreadcrumbs: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Additional Context
I think it would be better to switch to JavaScript default parameters instead since defaultProps is deprecated from React in function components.
Yeh same, looks like a fairly easy fix, tempted to have a go at it myself but React isn't my primary work although to be fair, nobody is merging PRs at the moment anyway... :/
I have the same message on a Next.js project...
I have the same warnings on Next.js 13
same warning on Next.js 13. better to go with a different component library?
Any update on this?
Same here on Next.js 14 - Console errors galore, but at least it works fine?
any update on this?
For now, the workaround I used is to apply the following patch onto the @geist-ui/core package using pnpm: https://github.com/Yash-Singh1/yashsingh.us/blob/f35837df572f58a8a4778aa668eb30687b5d1685/patches/%40geist-ui__core%402.3.8.patch. It changes all function components that rely on defaultProps to instead use default params.
any update on this?
The error message is flooding my console, what can be done to prevent/remove this?
+1
+1