Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 18 hydrateRoot support #149

Closed
mike-dvorscak-enablon opened this issue Aug 8, 2022 · 1 comment
Closed

React 18 hydrateRoot support #149

mike-dvorscak-enablon opened this issue Aug 8, 2022 · 1 comment

Comments

@mike-dvorscak-enablon
Copy link

After upgrading to React 18, we're seeing a react console error:
image

(error text: "ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17.")

When calling singleSpaReact with renderType = hydrate:

import React from "react";
import ReactDOM from "react-dom";
import singleSpaReact from "single-spa-react";
/* truncated for brevity */
singleSpaReact({
    React,
    ReactDOM,
    rootComponent,
    domElementGetter,
    renderType: "hydrate"
});

Will hydrateRoot be supported in PR #148? Do you know when that PR will be merged?

P.S. the need for our project is not urgent, just curious to know the timeline for planning purposes.

@filoxo
Copy link
Contributor

filoxo commented Aug 8, 2022

Will hydrateRoot be supported in PR #148?

Yes. You can verify this in the PR code here: https://github.com/single-spa/single-spa-react/pull/148/files#diff-cb30a967d456081f97d512503f30d39a71d3d112c66264972c01fbf8b7960ddaR15

Do you know when that PR will be merged?

No ETA. I just want as many eyes on it from the core team, and our time has been limited lately.

@filoxo filoxo closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants