Skip to content

BUG: React 18 => 19 (WordPress 7.1) Upgrade Issues #4315

@ZacharyRener

Description

@ZacharyRener

Describe the bug

WordPress 7.1 will upgrade React from 18 to 19:
https://make.wordpress.org/core/2026/05/27/react-19-upgrade-in-wordpress/

There are a few spots we need to improve on to prepare for this:

ReactDOM.render() being removed

assets/js/sites-admin.js

  • Used for the multisite -> all sites table -> per site toggle
  • Uses render() directly instead of createRoot
  • This will fail to render with React 19

All other render()  references already check for createRoot first. render() is used as a fallback - we should test this to make sure it won’t throw an error with a potentially undefined import.

Dependency Support

react-slider

  • Hasn’t been updated in 2 years
  • Doesn’t explicitly support React 19 (but may be fine)
  • It will need some testing or consideration for replacement
  • Used for range filter and range slider for facets and instant results

forwardRef deprecation

synonyms/components/common/edit-panel.js

  • uses forwardRef which will be deprecated
  • Won't break, but will throw a deprecation warning

Steps to Reproduce

Install the Gutenberg plugin version 23.3 which contains the React 19 upgrade

Currently, there is only an RC version: 23.3.0 RC1

This change will first ship in the Gutenberg plugin (version 23.3) and is expected to land in WordPress 7.1.

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions