React-dom findDOMNode
is being removed in React 19
#37408
Labels
[Focus] Compatibility
Ensuring our products play well with third-parties
[Platform] Atomic
[Platform] Simple
[Plugin] Jetpack
Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/
[Pri] Normal
[Type] Bug
When a feature is broken and / or not performing as intended
[Type] Janitorial
Impacted plugin
Jetpack
Quick summary
In React 19, the react-dom
findDOMNode()
function is being removed. More details on this are at https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-reactdom-finddomnodeI've already cleaned up most of the uses of
findDOMNode()
in the monorepo in #37380, but I couldn't figure out how to replace the uses inprojects/plugins/jetpack/_inc/client/components/popover/index.jsx
.jetpack/projects/plugins/jetpack/_inc/client/components/popover/index.jsx
Lines 80 to 85 in 7d3a11f
jetpack/projects/plugins/jetpack/_inc/client/components/popover/index.jsx
Lines 246 to 251 in 7d3a11f
jetpack/projects/plugins/jetpack/_inc/client/components/popover/index.jsx
Lines 198 to 205 in 7d3a11f
Since these are operating on an arbitrary React element passed in, we may need to change the interface for Popover to require an actual DOM node ref or something instead.
While this isn't a problem yet (React 19 is still in beta), eventually WordPress will start shipping it instead of React 18. At that point Popover will break, possibly breaking entire pages, so if we can clean this up ahead of time that would be useful.
Steps to reproduce
git grep findDOMNode
A clear and concise description of what you expected to happen.
No results calling the react-dom function of that name.
What actually happened
Impact
All
Available workarounds?
There is no user impact (yet)
Platform (Simple and/or Atomic)
Simple, Atomic, Self-hosted
Logs or notes
No response
The text was updated successfully, but these errors were encountered: