Revert React 19 upgrade#78940
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -15.9 kB (-0.19%) Total Size: 8.19 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in 7760704. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/26947690257
|
|
Haven't been this sad for any other reverts 😢 Let's work on the next steps, alongside this revert. Otherwise, I've a feeling we'll never be able to upgrade. |
True.
Yes, lets do it 💪 |
I will be OK in the end, we must now devise some good compat layer for plugins that were compiled and tested against React 18. |
|
Reverts:
Plus some conflict resolutions from changes to |
| export { | ||
| findDOMNode, | ||
| render, | ||
| hydrate, | ||
| unmountComponentAtNode, | ||
| } from './react-polyfill'; | ||
| // export { | ||
| // findDOMNode, | ||
| // render, | ||
| // hydrate, | ||
| // unmountComponentAtNode, | ||
| // } from './react-polyfill'; |
There was a problem hiding this comment.
Are we intending to keep this commented out vs. removed?
There was a problem hiding this comment.
I'm commenting it out because I expect to re-enable it soon again. It will be for sure part of the React 19 build.
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍
I did:
- A manual line-by-line inspection comparing this pull request to the original
- AI-assisted review of the same and other supporting pull requests
- Looked for new code additions that might be relying on React 19 features (ref as prop, inert, APIs like
use) - Spot check loading the editor, including with popular plugins like Elementor and WooCommerce to ensure no load errors. Elementor onboarding loads successfully.
|
A bummer we need to revert, but thank you for handling this, folks 🙇 |
We're running into some serious issues with plugins that bundle
react/jsx-runtimeand produce incompatible elements:$$typeof: Symbol.for('react.element')(legacy) versus$$typeof: Symbol.for('react.transitional.element')(new).Then there is a runtime check that throws when legacy element is encountered: https://react.dev/errors/525
React 19 used to have a feature flag called
renameElementSymbolto enable/disable this behavior, with some patching we might be able to recover it for WordPress/Gutenberg.