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

Function createThenableState

packages/react-reconciler/src/ReactFiberThenable.js:89–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87};
88
89export function createThenableState(): ThenableState {
90 // The ThenableState is created the first time a component suspends. If it
91 // suspends again, we'll reuse the same state.
92 if (__DEV__) {
93 return {
94 didWarnAboutUncachedPromise: false,
95 thenables: [],
96 };
97 } else {
98 return [];
99 }
100}
101
102export function isThenableResolved(thenable: Thenable<mixed>): boolean {
103 const status = thenable.status;

Callers 2

ReactFiberHooks.jsFile · 0.90
unwrapThenableFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected