-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update ReactDom.render
call to eliminate the deprecation warnings
#95339
Comments
In addition to this line that does the initial render on boot, you also need to update at least the Especially the By the way, the Stepper app has already been migrated in #93724, but it doesn't have any server side rendering. |
#95339 was deployed and then reverted by #95704 soon. The pre-release tests were consistently failing like this: https://teamcity.a8c.com/buildConfiguration/calypso_calypso_WebApp_Calypso_E2E_Pre_Release/13582370?hideProblemsFromDependencies=false&hideTestsFromDependencies=false&expandBuildChangesSection=true&expandBuildDeploymentsSection=false&expandBuildProblemsSection=true&expandBuildTestsSection=true, even though I had run them on the PR manually before deploying. I'm reopening the issue. However, I'm not sure when I'd be able to revisit it again :( |
No worries, we can try again next week 🙂 The concurrent mode in React 18 often slightly breaks something. |
I've created a PR that reverts the revert to test it out: #95750. It looks like I can actually reproduce the error pretty consistently on my machine. e.g. Running
That's good, since at least it's reproducible. It's actually so consistent that I'm wondering how I managed to get it pass on my previous PR. I'll see if I can find some time to look into this in the following days. |
I've run out of my time budget looking into this :( so I'm leaving some more breadcrumbs for whoever picking it up in the future. My best guess is that the way our e2e code handles asynchronous operations will need to be updated to match the behaviors of React 18 concurrent mode. However, I don't know what exactly that is. For example, in the particular test, Note that even though we should have logged in at the user-social step, However, if I simply added a 1 sec pending promise like so:
The test would pass just fine. Also note that, if I followed the steps in the test script manually, everything worked just fine as well. Thus my assumption is that the React concurrent mode has changed some of the asynchronous behavior in a subtle way that's liklely not visible to users, but critical to the e2e tests. Whoever picks up this task next will need to figure out that subtlety, and fix the tests accordingly. |
At the moment, accessing a local calypso instance dumps a series of
ReactDOM.render
deprecation warnings:While it is not causing any user facing issue, it creates noises to developers that would be the best to eliminate. It might be as simple as updating this line: https://github.com/Automattic/wp-calypso/blob/trunk/client/boot/common.js#L406 , but it might also be more involved than that. When in doubt, we should check in with @Automattic/team-calypso .
The text was updated successfully, but these errors were encountered: