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

Default Props Warning #838

Open
Yash-Singh1 opened this issue May 10, 2023 · 12 comments
Open

Default Props Warning #838

Yash-Singh1 opened this issue May 10, 2023 · 12 comments

Comments

@Yash-Singh1
Copy link

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.

@robinhayward
Copy link

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... :/

@jercomio
Copy link

I have the same message on a Next.js project...

@nbuk
Copy link

nbuk commented Aug 9, 2023

I have the same warnings on Next.js 13

@AlfredMadere
Copy link

same warning on Next.js 13. better to go with a different component library?

@georgeperry1
Copy link

Any update on this?

@K-Mistele
Copy link

Same here on Next.js 14 - Console errors galore, but at least it works fine?

@Arnavop
Copy link

Arnavop commented Jun 10, 2024

any update on this?

@Yash-Singh1
Copy link
Author

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.

@slarkvan
Copy link

any update on this?

@shreyaskaundinya
Copy link

The error message is flooding my console, what can be done to prevent/remove this?

@dannyblv
Copy link

+1

1 similar comment
@georgeperry1
Copy link

+1

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