MCPcopy
hub / github.com/facebook/react / startFlowing

Function startFlowing

packages/react-server/src/ReactFizzServer.js:6257–6279  ·  view source on GitHub ↗
(request: Request, destination: Destination)

Source from the content-addressed store, hash-verified

6255}
6256
6257export function startFlowing(request: Request, destination: Destination): void {
6258 if (request.status === CLOSING) {
6259 request.status = CLOSED;
6260 closeWithError(destination, request.fatalError);
6261 return;
6262 }
6263 if (request.status === CLOSED) {
6264 return;
6265 }
6266 if (request.destination !== null) {
6267 // We're already flowing.
6268 return;
6269 }
6270 request.destination = destination;
6271
6272 try {
6273 flushCompletedQueues(request, destination);
6274 } catch (error) {
6275 const errorInfo: ThrownInfo = {};
6276 logRecoverableError(request, error, errorInfo, null);
6277 fatalError(request, error, errorInfo, null);
6278 }
6279}
6280
6281export function stopFlowing(request: Request): void {
6282 request.destination = null;

Callers 12

renderNextChunkFunction · 0.90
onShellReadyFunction · 0.90
onAllReadyFunction · 0.90
readFunction · 0.90
onAllReadyFunction · 0.90
onShellReadyFunction · 0.90
onShellReadyFunction · 0.90
renderToStringImplFunction · 0.90
onAllReadyFunction · 0.90
createDrainHandlerFunction · 0.90
pipeFunction · 0.90
onShellReadyFunction · 0.90

Calls 4

closeWithErrorFunction · 0.90
flushCompletedQueuesFunction · 0.85
logRecoverableErrorFunction · 0.70
fatalErrorFunction · 0.70

Tested by

no test coverage detected