Briefing

React 19 Upgrade in WordPress Core and Gutenberg

wordpress
by Jarda Snajdr · WordPress Gutenberg

Migrate plugin code to React 19 by replacing deprecated APIs and adopting new createRoot, hydrateRoot, and other hooks.

What to do now

Update plugin code to use React 19 APIs and test with Gutenberg 23.3.

Summary

WordPress is shipping React 19 in Gutenberg 23.3 and targeting WordPress 7.1 for the core upgrade. React 19 removes several long‑deprecated APIs: ReactDOM.render(), ReactDOM.hydrate(), ReactDOM.unmountComponentAtNode(), and ReactDOM.findDOMNode(). It also deprecates defaultProps for function components and forwardRef, and changes the inert attribute to a boolean. New APIs such as use(), useActionState(), useOptimistic(), useFormStatus(), Activity, and useEffectEvent are now available through @wordpress/element. TypeScript types have been updated: MutableRefObject is deprecated, ReactElement props are now unknown, and ref types have changed. The upgrade also introduces ref callbacks that can return cleanup functions and removes the need for forwardRef. Gutenberg 23.3 ships with React 19, and WordPress 7.1 will ship the full upgrade.

Plugin developers must migrate code that uses the removed APIs, adopt the new hooks, and adjust TypeScript typings to avoid compile errors. Testing with Gutenberg 23.3 and enabling SCRIPT_DEBUG will surface any remaining issues.

The change is a major breaking update that will affect all WordPress sites that rely on custom JavaScript components.

Key changes

  • Removed render(), hydrate(), unmountComponentAtNode(), findDOMNode()
  • defaultProps for function components removed
  • forwardRef deprecated
  • inert attribute now boolean
  • New hooks: use(), useActionState(), useOptimistic(), useFormStatus(), Activity, useEffectEvent
  • MutableRefObject deprecated, ReactElement props unknown
  • Ref callbacks can return cleanup functions
  • Gutenberg 23.3 ships React 19, WordPress 7.1 targets the upgrade

Affects

wp-customers

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting