Skip to content

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

Closed
@DanielHeath

Description

@DanielHeath

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions