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

Function then

packages/react-dom/src/__tests__/ReactDOMForm-test.js:122–128  ·  view source on GitHub ↗
(resolve)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

resolveFunction · 0.70
pushMethod · 0.65
thenMethod · 0.65

Tested by

no test coverage detected