Skip to content

Resolve defaultProps deprecation warning for React v18+#5689

Merged
Methuselah96 merged 4 commits intoJedWatson:masterfrom
Rall3n:remove-default-props
Jul 13, 2023
Merged

Resolve defaultProps deprecation warning for React v18+#5689
Methuselah96 merged 4 commits intoJedWatson:masterfrom
Rall3n:remove-default-props

Conversation

@Rall3n
Copy link
Contributor

@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