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

Function aggregateErrors

packages/react/src/ReactAct.js:24–30  ·  packages/react/src/ReactAct.js::aggregateErrors
(errors: Array<mixed>)

Source from the content-addressed store, hash-verified

22let didWarnNoAwaitAct = false;
23
24function aggregateErrors(errors: Array<mixed>): mixed {
25 if (errors.length > 1 && typeof AggregateError === class="st">'function') {
26 class="cm">// eslint-disable-next-line no-undef
27 return new AggregateError(errors);
28 }
29 return errors[0];
30}
31
32export function act<T>(callback: () => T | Thenable<T>): Thenable<T> {
33 if (__DEV__) {

Callers 3

actFunction · 0.70
thenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected