-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Try: React 19 #61521
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
base: trunk
Are you sure you want to change the base?
Try: React 19 #61521
Conversation
It's odd that we see some warnings in the unit test on this PR but not when I did the React 18.3 upgrade. |
Indeed. Maybe they tinkered with some feature flags between 18.3 and 19 beta. |
If I understand correctly, many of the test warnings seem to be because of how Ariakit retrieves the ref prop, it falls back to and that yields a warning in React 19. At the same time, I assume Ariakit will stay compatible with older React versions where @diegohaz @DaniGuardiola any idea if we're planning to do anything about these warnings in Reakit? |
@diegohaz could Ariakit possibly use some sort of React version detection instead and use it to determine what to do, rather than this fallback system that creates warnings? |
That part was updated to avoid those warnings (ref: https://x.com/diegohaz/status/1780794744534163888). But apparently it's not enough? I still don't know the idiomatic way to fix that. |
@diegohaz @DaniGuardiola I actually tried updating to the latest Ariakit version in this branch and it seems to resolve those warnings 👍 Dani has started working on the update in #60992, and here we have one more reason to move it forward. |
Updated to the RC. Hoping to have some time next week to play more thoroughly with it. |
Size Change: +12.1 kB (+0.63%) Total Size: 1.93 MB
ℹ️ View Unchanged
|
Fixed some tests, most of them were pretty straightforward. At first glance, the mobile tests seem to be failing because RN uses an old React version - we'll need a RN update to support React 19. |
FYI, Framer Motion will be a blocker for now. More context: #60975 |
React 19.0.0-rc.0. is out.
Source: https://x.com/acdlite/status/1797668537349328923 I also wonder if facebook/react#29585 could be an issue for the block editor. Potentially, it can affect block re-ordering, but it will need some testing. |
Seems like we'll need to wait a bit for now, re https://x.com/sophiebits/status/1801663976973209620?s=46 and https://tkdodo.eu/blog/react-19-and-suspense-a-drama-in-3-acts Happy to retry this once the release gets unblocked once more. |
The suspense issue doesn’t affect our codebase, so we could try the latest RC. |
Updated to the latest RC. We'll still need to wait for RN support: |
See callstack/react-native-testing-library#1698 for RN support for React 19 (hopefully H1 2025) |
8424167
to
63ac11d
Compare
A few updates as I've been experimenting with making React 19 work in the meantime:
|
I'm experimenting with using |
IIRC, we can also use suspense around components loading assets on demand and defer rendering. It could help render different previews. |
The |
6a9ada3
to
0ae8c13
Compare
Thanks for the heads up. A few updates:
Haven't done thorough testing, but it could be in a testable state at this point. Next steps: There are some failing e2e tests, we need to investigate why and fix the cause. Note: React Native is still a blocker: callstack/react-native-testing-library#1698 |
React v19 is now stable - https://react.dev/blog/2024/12/05/react-19. It seems that the biggest blocker here would be React Native. |
31f99c3
to
da65652
Compare
23bba7d
to
399c6b6
Compare
e2b278c
to
390f370
Compare
@@ -142,14 +142,14 @@ | |||
"progress": "2.0.3", | |||
"puppeteer-core": "23.10.1", | |||
"raw-loader": "4.0.2", | |||
"react": "18.3.1", | |||
"react": "19.0.0", |
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.
Do we plan to pin the versions to the latest React (19.1.1)? Ref: https://github.com/facebook/react/releases.
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.
I would prefer we upgrade incrementally so have at least 1 release of the packages with 19.0, in case someone wants to stay on 19.0 and not upgrade to 19.1. Bumping to 19.1 will be the next thing after upgrading to v19.0 of course.
390f370
to
c827e9d
Compare
Won't have a chance to work on this anymore this week. Next up on my mind are:
|
Looks like I figured this out: it was related to how we were handling iframe content loading and rendering. See this thread for more info and d4b4827 as the solution that did the job. The majority of e2e tests should start passing after this fix. 🤞 We'll still need to test a bunch of the places that handle communication between the parent frame and the iframe. I'm expecting that's what causing the rest of the e2e failures. |
d4b4827
to
7270fbd
Compare
It seems the remaining e2e test failures are related to the |
Looks like it, but I think we have a bigger issue, but I'll comment about it shortly. Going to do a rebase to clean up unnecessary commits and consolidate some of the changes, which will also help with rebasing in the future. |
4d86875
to
0f75373
Compare
As I'm working to land independent pieces of the PR, it looks like we still have a major issue with how iframes and their events are handled. One can encounter it easily when there's communication happening between the iframe and the parent frame. One example path:
I haven't done a research yet, and I might be unable to do thorough research this week, but this appears like something in React 19 changed how we're working with iframes. I wonder if this is an opportunity to revisit the pre-existing iframe load hacks, or how we're handling This might be an interesting puzzle for y'all: @ellatrix @Mamaduka @jsnajdr. |
0f75373
to
cea1d58
Compare
This reverts commit 7351780.
cea1d58
to
69ce17d
Compare
@tyxla, I pushed some more fixes for the I believe the mentioned error is related to I cannot reproduce the error when running the app in production mode, using P.S. I found a different error when Screenshot |
de7453a
to
3777219
Compare
What?
Contains work to add React 19 support.
Not intended to be merged directly, but rather to serve as a container for experimentation with all necessary updates.
See #71336 for tracking the migration effort.
Why?
Keeping up to date with our latest framework dependencies and offering all the latest features.
How?
Bumping deps and working on various fixes to ensure React 19 compat. Don't merge.
Testing Instructions
Testing Instructions for Keyboard
Same as above
Screenshots or screencast
None