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

Function popActScope

packages/react/src/ReactAct.js:256–269  ·  view source on GitHub ↗
(
  prevActQueue: null | Array<RendererTask>,
  prevActScopeDepth: number,
)

Source from the content-addressed store, hash-verified

254}
255
256function popActScope(
257 prevActQueue: null | Array<RendererTask>,
258 prevActScopeDepth: number,
259) {
260 if (__DEV__) {
261 if (prevActScopeDepth !== actScopeDepth - 1) {
262 console.error(
263 'You seem to have overlapping act() calls, this is not supported. ' +
264 'Be sure to await previous act() calls before making a new one. ',
265 );
266 }
267 actScopeDepth = prevActScopeDepth;
268 }
269}
270
271function recursivelyFlushAsyncActWork<T>(
272 returnValue: T,

Callers 2

actFunction · 0.85
thenFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected