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

chore: make react* sdks react 19 compatible #348

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Jan 11, 2025

This PR includes changes aimed to add support for React 19 with the react and react-core packages.

The first immediate thing is there are several external dependencies in react and react-core that need be updated to the latest versions so they support or allow react 19 as a peer dependency.

There was one exception to this which was react-popper - the react-popper project was deprecated earlier last year in favor of a new project floating-ui as a successor. The last react-popper version has react 18 as a peer dependency so we need to migrate to the new floating-ui lib, but the API has changed slightly so it involved some code changes.

There are a few remaining questions/issues:

  • We will most likely need to remove react-popper-tooltip from react for the same reason explained above. react-popper-tooltip itself accepts react 19, but it has a dependency to react-popper 2.3.0, which has a deep dep up to react 18.
  • Upgrading radix to the latest versions may cause issues for customers running react 16, based one this previous PR: chore(kno-7236): pin Radix dependencies to support React 16 #273
  • There may be issues with zustand and react 19. I tried setting react and @types/react to 19 in our react-core package, and the type check was failing and a couple of the errors were coming from zustand func calls. My first thought was to upgrade zustand to the latest and make any necessary changes, but I realized we are quite behind and I vaguely remember us having issues upgrading zustand?

I think the ideal solution is to resolve the issues above, but still keep react and react-dom deps for dev in our packages still at 18 because it seems like our monorepo setup forces a single consistent version across all of our packages and example apps, and upgrading them may be too big of a lift.

Copy link

vercel bot commented Jan 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
in-app-messages-example ❌ Failed (Inspect) Jan 11, 2025 5:41pm
javascript-ms-teams-connect-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 5:41pm
javascript-nextjs-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 5:41pm
javascript-slack-connect-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 5:41pm
javascript-slack-kit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 5:41pm

Copy link

linear bot commented Jan 11, 2025

Copy link

changeset-bot bot commented Jan 11, 2025

⚠️ No Changeset found

Latest commit: fd9eca3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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.

1 participant