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

Function unwrapThenable

packages/react-server/src/ReactFizzHooks.js:766–773  ·  view source on GitHub ↗
(thenable: Thenable<T>)

Source from the content-addressed store, hash-verified

764}
765
766export function unwrapThenable<T>(thenable: Thenable<T>): T {
767 const index = thenableIndexCounter;
768 thenableIndexCounter += 1;
769 if (thenableState === null) {
770 thenableState = createThenableState();
771 }
772 return trackUsedThenable(thenableState, thenable, index);
773}
774
775export function readPreviousThenableFromState<T>(): T | void {
776 const index = thenableIndexCounter;

Callers 3

renderSuspenseListFunction · 0.90
retryNodeFunction · 0.90
useFunction · 0.70

Calls 2

createThenableStateFunction · 0.90
trackUsedThenableFunction · 0.90

Tested by

no test coverage detected