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

Function deferTask

packages/react-server/src/ReactFlightServer.js:2033–2054  ·  view source on GitHub ↗
(request: Request, task: Task)

Source from the content-addressed store, hash-verified

2031const MAX_ROW_SIZE = 3200;
2032
2033function deferTask(request: Request, task: Task): ReactJSONValue {
2034 // Like outlineTask but instead the item is scheduled to be serialized
2035 // after its parent in the stream.
2036 const newTask = createTask(
2037 request,
2038 task.model, // the currently rendering element
2039 task.keyPath, // unlike outlineModel this one carries along context
2040 task.implicitSlot,
2041 task.formatContext,
2042 request.abortableTasks,
2043 enableProfilerTimer &&
2044 (enableComponentPerformanceTrack || enableAsyncDebugInfo)
2045 ? task.time
2046 : 0,
2047 __DEV__ ? task.debugOwner : null,
2048 __DEV__ ? task.debugStack : null,
2049 __DEV__ ? task.debugTask : null,
2050 );
2051
2052 pingTask(request, newTask);
2053 return serializeLazyID(newTask.id);
2054}
2055
2056function outlineTask(request: Request, task: Task): ReactJSONValue {
2057 const newTask = createTask(

Callers 1

renderModelDestructiveFunction · 0.85

Calls 3

createTaskFunction · 0.85
serializeLazyIDFunction · 0.85
pingTaskFunction · 0.70

Tested by

no test coverage detected