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 DOM 19 breaks the rendering due to async_hooks #769

Closed
ShivamJoker opened this issue Jan 4, 2025 · 2 comments · Fixed by #776
Closed

React DOM 19 breaks the rendering due to async_hooks #769

ShivamJoker opened this issue Jan 4, 2025 · 2 comments · Fixed by #776

Comments

@ShivamJoker
Copy link
Contributor

With the new update, React DOM renderToString doesn't work with LLRT due to unsuppored async_hooks

To fix it I have imported the module from edge package.

import { renderToStaticMarkup } from "react-dom/server.edge";

However the example code in the repo is still same with React v19 which won't work.

@richarddd
Copy link

Yeah we don’t support async hooks, that API is also discouraged so a bit surprised react depend on it. Maybe that’s why they have “server.edge” module. Would be fantastic if you can open a PR 🙌

@ShivamJoker
Copy link
Contributor Author

@richarddd sure I'll send PR.
It gives TS errors though, any idea how to get away with it apart from using @ts-ignore.

BTW nice profile pic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants