Skip to content

Conversation

jake-brandt
Copy link

Summary & motivation

This is a rebase with a few updated unit tests, forked from #585 (original PR by @bagedevimo). It also updates the Storybook React dependency from v6 to v9 to allow us to move up to React v19. I attempted to run the Storybook codemods but no possible migrations were detected, nor is the core Storybook package a part of the project, so my confidence in Storybook working with this is slim. But it's not blocking React 19 now at least.

Original PR summary and documentation:

Summary & motivation
Upgrade React and associated packages & types to React 19.x
Convert React imports to use the recommended import syntax
Testing & documentation
I compared the output of dist/ on master vs this branch and checked each change was the expected change.

Testing & documentation

Existing unit tests were updated to work with the new React 19 patterns. A few tests actually removed original spies as the execution of the test without exception is enough to prove that those test cases pass. Two tests remain failing, likely due to significant changes in promise/async resolution in React 19.

bagedevimo and others added 4 commits September 10, 2025 23:05
Doing so prevents any named imports leaking into the output type
definitions (.d.ts files) and follows with what seems to be the React
official recommendations [1].

The more 'correct' fix would be only import those components that are
needed by each component, but that's a bigger change.

[1] facebook/react#18102

Fixes stripe#569
@rvolyar-stripe
Copy link
Contributor

@jake-brandt Are you noticing any incompatibilities, such as this issue outlined, when using react-stripe-js in your project, that requires a bump to React 19?

@jake-brandt
Copy link
Author

@jake-brandt Are you noticing any incompatibilities, such as this issue outlined, when using react-stripe-js in your project, that requires a bump to React 19?

Hi @rvolyar-stripe, assuming the dependent project employs version overrides in their package.json, the current release builds appear to function so far. However, and this is a big however for now, our application will be going through QA regression next week to actually test full checkout and webhooks. Currently I have only tested adding a new card to a wallet. I will let you know what, if anything, is found during regression runs.

I haven't run into any issues with the JSX global namespace being moved under React's; but I'm aware of that change from when we upgraded our own application to v19. Other changes we ran into were mostly around route arguments, cookies, etc. being Promises now. I don't see how that will work with the v18 React target unless you aren't using that functionality at all; hence I was a bit surprised when the application both built and actually still added a payment card lol.

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.

3 participants