facebook/react · error · Error
334
334
Error message
Accumulated items must not be null or undefined.
What it means
Error "Accumulated items must not be null or undefined." thrown in facebook/react.
Source
Thrown at packages/react-native-renderer/src/legacy-events/accumulate.js:24
*
* @flow
*/
import isArray from 'shared/isArray';
/**
* Accumulates items that must not be null or undefined.
*
* This is used to conserve memory by avoiding array allocations.
*
* @return {*|array<*>} An accumulation of items.
*/
function accumulate<T>(
current: ?(T | Array<T>),
next: T | Array<T>,
): T | Array<T> {
if (next == null) {
throw new Error('Accumulated items must not be null or undefined.');
}
if (current == null) {
return next;
}
// Both are not empty. Warning: Never call x.concat(y) when you are not
// certain that x is an Array (x could be a string with concat method).
if (isArray(current)) {
// $FlowFixMe[incompatible-use] `isArray` does not ensure array is mutable
return current.concat(next);
}
if (isArray(next)) {
/* $FlowFixMe[incompatible-return] unsound if `next` is `T` and `T` an array,
* `isArray` might refine to the array element type of `T` */
return [current].concat(next);
}View on GitHub (pinned to eafeac097b)
When it happens
Trigger: Thrown at packages/react-native-renderer/src/legacy-events/accumulate.js:24 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/7aa4afa7f3c0d7fb.
Report an issue: GitHub.