geist-org / geist-ui

A design system for building modern websites and applications.
https://geist-ui.dev
MIT License
4.31k stars 332 forks source link

Default Props Warning #838

Open Yash-Singh1 opened 1 year ago

Yash-Singh1 commented 1 year ago

Bug report 🐞

Version & Environment

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 commented 1 year ago

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 commented 1 year ago

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

nbuk commented 1 year ago

I have the same warnings on Next.js 13

AlfredMadere commented 1 year ago

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

georgeperry1 commented 6 months ago

Any update on this?

K-Mistele commented 5 months ago

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

Arnavop commented 3 months ago

any update on this?

Yash-Singh1 commented 2 months ago

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 commented 2 months ago

any update on this?

shreyaskaundinya commented 1 month ago

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

dannyblv commented 3 weeks ago

+1

georgeperry1 commented 2 weeks ago

+1