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

Function getThenablesFromState

packages/react-reconciler/src/ReactFiberThenable.js:39–47  ·  view source on GitHub ↗
(state: ThenableState)

Source from the content-addressed store, hash-verified

37export opaque type ThenableState = ThenableStateDev | ThenableStateProd;
38
39function getThenablesFromState(state: ThenableState): Array<Thenable<any>> {
40 if (__DEV__) {
41 const devState: ThenableStateDev = (state: any);
42 return devState.thenables;
43 } else {
44 const prodState = (state: any);
45 return prodState;
46 }
47}
48
49// An error that is thrown (e.g. by `use`) to trigger Suspense. If we
50// detect this is caught by userspace, we'll log a warning in development.

Callers 1

trackUsedThenableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected