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

Function ReactPromise

packages/react-client/src/ReactFlightClient.js:254–265  ·  view source on GitHub ↗
(status: any, value: any, reason: any)

Source from the content-addressed store, hash-verified

252
253// $FlowFixMe[missing-this-annot]
254function ReactPromise(status: any, value: any, reason: any) {
255 this.status = status;
256 this.value = value;
257 this.reason = reason;
258 if (enableProfilerTimer && enableComponentPerformanceTrack) {
259 this._children = [];
260 }
261 if (__DEV__) {
262 this._debugChunk = null;
263 this._debugInfo = [];
264 }
265}
266// We subclass Promise.prototype so that we get other methods like .catch
267ReactPromise.prototype = (Object.create(Promise.prototype): any);
268// TODO: This doesn't return a new Promise chain unlike the real .then

Callers

nothing calls this directly

Calls 9

getModuleDebugInfoFunction · 0.90
requireModuleFunction · 0.90
closeDebugChannelFunction · 0.85
ifFunction · 0.70
enqueueModelMethod · 0.65
forEachMethod · 0.65
errorMethod · 0.65
valueFunction · 0.50
applyMethod · 0.45

Tested by

no test coverage detected