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

Resolve defaultProps deprecation warning for React v18+ #5689

Merged
merged 4 commits into from
Jul 13, 2023

Conversation

Rall3n
Copy link
Collaborator

@Rall3n Rall3n commented Jul 3, 2023

The next minor release of React (v18.3.0) will throw a deprecation warning if functional components use defaultProps (see facebook/react#25699 for reason why).

PR removes defaultProps references on functional components (only in package, not docs) and replaces them with JavaScript default parameters.

Resolves #5596.

@changeset-bot
Copy link

changeset-bot bot commented Jul 3, 2023

🦋 Changeset detected

Latest commit: 44fe2af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-select Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 3, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 44fe2af:

Sandbox Source
react-codesandboxer-example Configuration
react-select-v5-sandbox (forked) Issue #5596

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.

Usage of defaultProps on functional components is deprecated and results in warning
2 participants