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

Fix deprecated defaultProps warning in React >18.2.0 #1024

Conversation

VanTanev
Copy link

@VanTanev VanTanev commented Jun 6, 2023

Description

In React 18.3.0 (unreleased) and React-canary (used by NextJS 13.4 App Router stable), react throws console warnings for defaultProps

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

Fixes #997

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • New and existing unit tests pass locally with my changes (I have run pnpm run test:ci-with-server/pnpm run test)

Could not run tests, they're broken on main branch.

@vercel
Copy link

vercel bot commented Jun 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuka-carousel-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2023 3:29pm

@VanTanev
Copy link
Author

Is there anything we can do to move this forward?

@carbonrobot carbonrobot closed this Apr 5, 2024
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

Successfully merging this pull request may close these issues.

Remove defaultProps for React 18.3.0
2 participants