bigcommerce / catalyst

Catalyst - for Composable Commerce
https://catalyst-demo.site
MIT License
118 stars 157 forks source link

feat: ugprade to React 19 RC #1603

Closed migueloller closed 3 weeks ago

migueloller commented 3 weeks ago

Note, this commit also regenerated the pnpm-lock.yaml file to force @types/react and @types/react-dom to be overridden with types-react@rc and types-react-dom@rc, respectively.

What/Why?

We're upgrading React to 19 RC so that we can use useActionState instead of useFormState. We need this because useFormState does not have an isPending value, which we rely on extensively.

We also had to upgrade to Next.js 15 to use React 19 RC.

Testing

Before

https://github.com/user-attachments/assets/9caa2945-cbe2-45bd-8d60-8c53f38970a3

Ater

https://github.com/user-attachments/assets/0b52292f-d0f1-4942-8924-3b22c3cde8da

linear[bot] commented 3 weeks ago

VIB-867 Upgrade to React 19

vercel[bot] commented 3 weeks ago

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

Name Status Preview Comments Updated (UTC)
catalyst 🔄 Building (Inspect) Visit Preview 💬 Add feedback Nov 10, 2024 6:44am
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2024 6:44am
catalyst-soul ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2024 6:44am
4 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **catalyst-1millionproducts-store** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-1millionproducts-store/GK6fPVv4L37qTJC4HxP6qiZti9qq)) | | | Nov 10, 2024 6:44am | | **catalyst-au** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-au/DB3LMTcKL5z7q52GJD1i6Zr3nnRz)) | | | Nov 10, 2024 6:44am | | **catalyst-uk** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-uk/5BJrwXwHdEQSzxoYLsxiCzam2qRi)) | | | Nov 10, 2024 6:44am | | **catalyst-unstable** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-unstable/2hdD5cKD3Bg7uhDoqCZU1TMKnxWk)) | | | Nov 10, 2024 6:44am |
changeset-bot[bot] commented 3 weeks ago

⚠️ No Changeset found

Latest commit: e8055c918917b5049186ef0efe2dbfa652502207

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

migueloller commented 3 weeks ago

Unfortunately this is causing a 500 in the PDP. I'm going to have to pivot in approach and attempt to build the useActionState interface using useFormState together with useTransition.