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

The defaultProps in function components will be removed in a future version of React. #940

Open
soyeon9211 opened this issue Sep 2, 2024 · 3 comments

Comments

@soyeon9211
Copy link

soyeon9211 commented Sep 2, 2024

Hello, the library is using has code that utilizes defaultProps, which is causing my console to be cluttered with warnings. Since defaultProps will soon be deprecated, it needs to be updated.

스크린샷 2024-09-02 오후 1 28 34 스크린샷 2024-09-02 오후 1 28 51
@fabienrohrer
Copy link

same issue here!

@fabienrohrer
Copy link

It's due to the use of ´defaultProps´ here:

Circle.defaultProps = {

A solution is certainly to use default parameter instead of defaultProps everywhere:

export const Circle = ({
  width = 252,
  onChange = undefined,
  // etc.

It seems this repo is not maintained. I fear that creating a patch is a waste of time...

@emersonbroga
Copy link

Same issue was mentioned here #903.
Looks like there's a PR for this already #893 but there's no maintainers #928.

Any suggestions?

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

3 participants