JedWatson / react-select

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

Fix types compatibility with React 19 #5912

Open Methuselah96 opened 1 month ago

Methuselah96 commented 1 month ago

Fixes #5911.

React 19 removes the JSX type from the global scope, so it now needs to be imported from React.

This causes some immediate issues for the users of react-select who are trying to use it with @types/react@19, since the Select types relies on the JSX.LibraryManagedAttributes type.

Note that this is technically a breaking change because it requires TypeScript users to have a version of @types/react after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64464 shipped.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: ed73fc2e638cf15bfd8d9cdc36d56c266a5f9f91

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 month 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.