-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
Async React.renderToString for server-side rendering #3793
Comments
This is something we want to do, but it requires more thought around how components are rendered because the currently solution always renders something synchronously. In your example, what does it wait for before returning the result? Anyway, we're tracking this in #1739. |
Great. As you can see I'm rendering the component server-side with nodejs/express and using a sync method does not feel right (blocking). Thanks. |
React.renderToString doesn't do any I/O so you wouldn't gain anything from it being async in its current form. |
Where you might benefit is not so much async but streaming markup generation. Follow along in #3009 for more there. |
Thanks! Following #3009 then. |
There’s new work in this area in #20970. |
It would really help if we could use the
async
version of theReact.renderToString
when rendering on the server-side.The text was updated successfully, but these errors were encountered: