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

Function then

packages/react-reconciler/src/__tests__/ReactTransition-test.js:124–130  ·  view source on GitHub ↗
(resolve)

Source from the content-addressed store, hash-verified

122 const thenable = {
123 pings: [],
124 then(resolve) {
125 if (newRecord.status === 'pending') {
126 thenable.pings.push(resolve);
127 } else {
128 Promise.resolve().then(() => resolve(newRecord.value));
129 }
130 },
131 };
132
133 const newRecord = {

Callers

nothing calls this directly

Calls 3

resolveFunction · 0.70
pushMethod · 0.65
thenMethod · 0.65

Tested by

no test coverage detected