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

[Feature request] [ReactDom] Server rendering with chunked encoding #7518

Closed
DanielHeath opened this issue Aug 18, 2016 · 3 comments
Closed

Comments

@DanielHeath
Copy link

Feature request

What is the current behavior?
Currently ReactDom.renderToString() must synchronously render a complete component.

This means that react servers which connect to other data sources must wait for those to respond before beginning to send an HTTP response.

What is the desired behavior?
Support server-side use of encoding: chunked by

  • Exposing a streaming render API e.g. ReactDom.renderToStream().
  • Providing a way for react components to 'block' rendering server-side

What would this improve?
This would enable much lower latency in cases where a server is connecting to multiple backing services to service a request, because content early in the document can be delivered to the browser before all backends have responded.

@DanielHeath
Copy link
Author

This is related to #6420 but adds the ability for components to say 'I am not quite ready yet; block rendering' on the server.

@gaearon
Copy link
Collaborator

gaearon commented Oct 4, 2017

#6420 has landed in React 16.
https://medium.com/@aickin/whats-new-with-server-side-rendering-in-react-16-9b0d78585d67

We have another issue for “blocking rendering” in #1739 so let’s close this one.

@gaearon gaearon closed this as completed Oct 4, 2017
@gaearon
Copy link
Collaborator

gaearon commented Mar 24, 2021

#20970

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