JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.63k stars 4.13k forks source link

Resolve `defaultProps` deprecation warning for React v18+ #5689

Closed Rall3n closed 1 year ago

Rall3n commented 1 year ago

The next minor release of React (v18.3.0) will throw a deprecation warning if functional components use defaultProps (see https://github.com/facebook/react/pull/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[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 44fe2afc6a13cb9aabb42176dccedd79200c06b1

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[bot] commented 1 year ago

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 44fe2afc6a13cb9aabb42176dccedd79200c06b1:

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