Home / Function/ renderToStream() — react Function Reference

renderToStream() — react Function Reference

Architecture documentation for the renderToStream() function in ReactDOMServerFB.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  4da391f1_d599_e3c3_5e9b_32af1a05a67c["renderToStream()"]
  d055cb24_73d6_ffe8_0232_7ee0d7126941["ReactDOMServerFB.js"]
  4da391f1_d599_e3c3_5e9b_32af1a05a67c -->|defined in| d055cb24_73d6_ffe8_0232_7ee0d7126941
  style 4da391f1_d599_e3c3_5e9b_32af1a05a67c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-server-dom-fb/src/ReactDOMServerFB.js lines 46–82

function renderToStream(children: ReactNodeList, options: Options): Stream {
  const destination = {
    buffer: '',
    done: false,
    fatal: false,
    error: null,
  };
  const resumableState = createResumableState(
    options ? options.identifierPrefix : undefined,
    options ? options.unstable_externalRuntimeSrc : undefined,
    options ? options.bootstrapScriptContent : undefined,
    options ? options.bootstrapScripts : undefined,
    options ? options.bootstrapModules : undefined,
  );
  const request = createRequest(
    children,
    resumableState,
    createRenderState(
      resumableState,
      undefined,
      options ? options.unstable_externalRuntimeSrc : undefined,
    ),
    createRootFormatContext(undefined),
    options ? options.progressiveChunkSize : undefined,
    options.onError,
    undefined,
    undefined,
  );
  startWork(request);
  if (destination.fatal) {
    throw destination.error;
  }
  return {
    destination,
    request,
  };
}

Domain

Subdomains

Frequently Asked Questions

What does renderToStream() do?
renderToStream() is a function in the react codebase, defined in packages/react-server-dom-fb/src/ReactDOMServerFB.js.
Where is renderToStream() defined?
renderToStream() is defined in packages/react-server-dom-fb/src/ReactDOMServerFB.js at line 46.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free