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

[BUG] Make v5 React 19 compatible #356

Closed
2 of 6 tasks
rmanganiello opened this issue Jan 24, 2025 · 5 comments
Closed
2 of 6 tasks

[BUG] Make v5 React 19 compatible #356

rmanganiello opened this issue Jan 24, 2025 · 5 comments
Assignees
Labels
Bug Something isn't working

Comments

@rmanganiello
Copy link

rmanganiello commented Jan 24, 2025

Description

When I use Chakra React Select V5, I expected this package to be compatible with React 19 but it isn't

The main reason for this issue to happen is because v5 has React Select 5.8.x as peer dependency and they added the corresponding support since version 5.9 [1].

It would be awesome to allow this to avoid having to migrate to Chakra v6 to be React 19 compatible (which also involves migrate to Chakra UI v3, a huge refactor).

[1] https://github.com/JedWatson/react-select/releases

chakra-react-select Version

5.0.2

Link to Reproduction

No response

TypeScript?

  • Yes I use TypeScript

Operating System

  • macOS
  • Windows
  • Linux
  • iOS/iPadOS
  • Android

Package Manager

Yarn

Additional Information

Here's a screenshot about the new versions in React Select.

Image

Reference: https://github.com/JedWatson/react-select/releases

@rmanganiello rmanganiello added the Bug Something isn't working label Jan 24, 2025
rmanganiello added a commit to rmanganiello/chakra-react-select that referenced this issue Jan 24, 2025
This PR updates the `react-select` dependency to the latest version
which is fully compatible with React 19.

It also solves issue csandman#356

Reference: https://github.com/JedWatson/react-select/releases
@fabmont
Copy link

fabmont commented Jan 24, 2025

I'm having the same issue.
I'm using Chakra v2 and Chakra React Select v5. When I bumped to React 19, all typings for the select component got away.
I saw that it got fixed in the react-select repo, it would be great to have that applied here too, so I can fully migrate my project to React 19.

@csandman csandman added Not Really a Bug Someone thought it was a bug, but turns out its not a bug and removed Not Really a Bug Someone thought it was a bug, but turns out its not a bug labels Jan 24, 2025
@csandman
Copy link
Owner

The reason v5 isn't updated to allow React 19 as a peer dependency is actually because Chakra UI v2 isn't marked as compatible with React 19. @fabmont Is Chakra v2 working fine with React 19 for you besides this package?

In either case, I'll push a release now that updates the dependency for react-select, because there's no reason it can't be on the newest version either way haha.

@csandman
Copy link
Owner

csandman commented Jan 24, 2025

Ok a new version v5.0.3 updates the react-select dependency version to v5.10.x. Thanks for the PR @rmanganiello! Let me know if that fixes your issue.

I'm still curious if you're having success using Chakra v2 with React 19 though, as it appears that it shouldn't be compatible.

Actually never mind! I just installed the latest version of Chakra UI v2 and discovered that it actually does allow for React 19! Not only that, but it has for a while haha. It looks like Chakra has always had a peer dep of "react": ">=18". I'm going to expand the dependency range for this package so it accepts v19 as well, so people can avoid using --legacy-peer-deps.

@fabmont
Copy link

fabmont commented Jan 24, 2025

Thank you for the quick response on that @csandman. Everything is working now on React 19, I'll let you know if that will get fixed with this new release!

@csandman
Copy link
Owner

Ok, I actually just made one more fix to make this fully compatible with React 19, by updating the peer dependency range. Hopefully this should work for everyone now!

Feel free to re-open this issue if anyone is still having trouble with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants