Expose React Root on cypress/react test harness for Cypress 14 #30622
Labels
npm: @cypress/react
@cypress/react package issues
type: feature
New feature that does not currently exist
What would you like?
cypress/react
with Cypress 14 should support returning the root created byReactDom.createRoot
in the case users wish to call anunmount
.Why is this needed?
Since
cypress/react
supports React 18 (and up) with Cypress 14 andReactDom.unmountComponentAtNode
is deprecated in React 18 and removed in React 19, Cypress should return the root created fromReactDom.createRoot
in the case users want to call anunmount
. This can no longer be done strictly withgetContainerEl()
Other
We likely need to hang onto
getContainerEl()
for a bit longer as users may not have migrated away from it, but we should deprecate this method in addition to this work as it will likely be removed once we fully support react 19 onlyThe text was updated successfully, but these errors were encountered: