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

Warning: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #365

Open
Prince-Csaba opened this issue Feb 6, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Prince-Csaba
Copy link

Dear Team,

First of all, thank you for the great work, this Calendar Datepicker is beautiful and super useful.

However, I'm getting the below error on the console. Could you please let me know more about this? Will this have an effects on the calendar functionalities or it will work as before?

Are you planning to solve this issue? Also, I would like to offer my assistance if I can help with this.

Thank you.

The error:
Warning: F: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at F (webpack-internal:///(ssr)/./node_modules/@hassanmojab/react-modern-calendar-datepicker/lib/index.js:858:15)

Warning: W: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at W (webpack-internal:///(ssr)/./node_modules/@hassanmojab/react-modern-calendar-datepicker/lib/index.js:681:15)

Warning: B: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at B (webpack-internal:///(ssr)/./node_modules/@hassanmojab/react-modern-calendar-datepicker/lib/index.js:681:15)

@Prince-Csaba Prince-Csaba added the question Further information is requested label Feb 6, 2024
@Cow258
Copy link

Cow258 commented May 17, 2024

I have updated my forked repository to support React v19.

To resolve this error,
please modify your package.json as follows:

{
  "dependencies": {
    "react-modern-calendar-datepicker": "github:Cow258/react-modern-calendar-datepicker#built"
  }
}

or

npm install --save github:Cow258/react-modern-calendar-datepicker#built
yarn add github:Cow258/react-modern-calendar-datepicker#built
pnpm i github:Cow258/react-modern-calendar-datepicker#built

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants