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

Function unwrapThenable

packages/react-reconciler/src/ReactChildFiber.js:278–285  ·  view source on GitHub ↗
(thenable: Thenable<T>)

Source from the content-addressed store, hash-verified

276}
277
278function unwrapThenable<T>(thenable: Thenable<T>): T {
279 const index = thenableIndexCounter;
280 thenableIndexCounter += 1;
281 if (thenableState === null) {
282 thenableState = createThenableState();
283 }
284 return trackUsedThenable(thenableState, thenable, index);
285}
286
287function coerceRef(workInProgress: Fiber, element: ReactElement): void {
288 // TODO: This is a temporary, intermediate step. Now that enableRefAsProp is on,

Callers 5

createChildFunction · 0.70
updateSlotFunction · 0.70
updateFromMapFunction · 0.70
nextFunction · 0.70
reconcileChildFibersImplFunction · 0.70

Calls 2

createThenableStateFunction · 0.90
trackUsedThenableFunction · 0.90

Tested by

no test coverage detected