-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix issue with Jest and legacy React apps using useTransition #2394
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
Conversation
🦋 Changeset detectedLatest commit: d68bc40 The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Can you add a changeset please? also is there a way to test this change easily? |
@joshuaellis I'll add the changeset today. I'll try to think if I can add a test but since it needs 2 different versions of React I don't think it's possible. I could add a demo with the failing code if you want. |
@joshuaellis I'm really keen to move this PR. Is there anything I need to do to help move the process? |
I'll do an experimental release tomorrow, you can use it in a small demo w/ r18 to validate it works and share? StackBlitz would work? |
I've just pushed a beta – https://www.npmjs.com/package/@react-spring/web/v/10.0.3-beta.0 thanks for the nudge 👍🏼 |
@joshuaellis thank you! Will try to push a demo on StackBlitz as soon as possible |
@joshuaellis Broken demo with 10.0.2 -> https://stackblitz.com/edit/vitejs-vite-f34k2mgy Code is exactly the same only react spring version changing. Code is AI but I made sure it reproduces my issue |
@joshuaellis sorry to be a pain. I added the demos in my previous comment and also it was tested by @romain-trotard on his PR #2396 and he too found the solution here to be working. We would love if you could review and move it for release! |
Yep checked both your demos & even checked the working one on r19 and LGTM ✅ |
Why
Using latest react-spring version on a legacy React app (< 19.0.0) is throwing
Error: Uncaught [TypeError: Cannot read properties of null (reading 'ref')]
cause by this PR #2373What
Patching the ref check so it doesn't try to assign the ref to the props object but passes the ref directly to the element.
Checklist