-
Notifications
You must be signed in to change notification settings - Fork 9
[JS] Support React 19 in React SDKs #419
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
[JS] Support React 19 in React SDKs #419
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: e2563d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we considered dropping zustand for tanstack-store after using it for in-app-messages? I'm not strongly for it given how many changes we're already having to make here but maybe worth exploring.
@connorlindsey Re: tanstack-store. Chris and I talked about it but we figured it was out of scope for now. I'm a big tanstack fan, the idea sounds nice! But let's revisit that another time |
* [JS] Support React 19 in React SDKs (#419) * removes react-popper dependency * allow react 19 * upgrades zustand * merge * fixes render loop bug * adjusts version number, removes placeholder * undo example changes for this branch * Better URL in comment * fixes zustand implementation * matches types on main * Use new store * merges in examples * Cleanup CRA example * fixes docs to remove zustand requirement * Tests pass locally * fixes dev dependency issues * runs lint * runs format * remove unused dependency * adds setup env variable * clean up PR * Improves selector typing and validates that it works * runs formatter * comment removes unnecessary info * Better import and comments * rips out rerender hack * better styling setup * updates to match main and easier merge * run lint and format * Updates a few readmes * Create red-owls-jog.md * adds version bumps for dependent packages and adds migration guide * adds package specific upgrade guides * updates upgrade guide to be more specific * better formatting on upgrade guide * downgrade zustand to support react 16 * undo manual version bump * update guides and small PR feedback updates * updates docs examples to stick with useNotificationStore * adds links to upgrade guides * fix(kno-7523): fixes separation of zustand vanilla and react (#429) * fixes type handling * testing new behavior * lint and format * Removes upgrade guide and validated store * remove console logs * removes test data * fix(kno-7971): adds autoRegister to useEffect deps (#437) * fix(kno-7523): fixes bad returns from useNotificationStore (#439) * fix(kno-7523): fixes bad returns from useNotificationStore * adds better types and comments: * fixes hook name * adds tests * bumps telegraph component versions in nextjs example * align turbo * lock eslint-config-turbo resolution
[JS] Support React 19 in React SDKs
Breaking changes:
feed.store
now uses theUseBoundStore<StoreApi<FeedStoreState>>
type (previouslyStoreApi<FeedStoreState>
), meaning users no longer need their own implementation ofzustand
to use the store directly.Users who relied only on
useNotificationStore
to access the store will not be affected, only users who usefeedClient.store
directly.General Changes:
Enables support for React 19
This PR adds support for React 19 by including it within the
peerDependencies
of the various packages.Removes
react-popper
dependencyThis dependency was deprecated. I opted to use our existing dependency
@popperjs/core
for popup elementsUpgrades
zustand
to v4Introduces a breaking change when users use the
feedClient.store
directly.We decided not to upgrade to
v5
because that would drop support for React 16, which we should support.Upgrades internal
Telegraph
components for React 19 supportIn order for these packages to support React 19, we had to first enable our Telegraph components to support React 19. After that was done, I bumped all of the Telegraph dependencies in this PR.
Next.js Example Now Uses Telegraph Components
Now that we have the
@telegraph
design system supporting React 19, we were able to use it in thenext-js-example
app.A note on
react-native
package:As of 2 days ago, React 19 is now available on React Native, however, dependent packages like react-shallow-renderer need time to catch up and support this. So for now, we will leave the
react-native
package as is. This causes a dependency warning when runningyarn install
at the root of this repository, but that won't affect individual builds.Linear issue
Addresses issue "Support React 19 #317"