diff --git a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
index 8fd88307871db..7b7d5fa6198e2 100644
--- a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
+++ b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
@@ -354,7 +354,7 @@ describe('ReactFunctionComponent', () => {
}
expect(() => ReactTestUtils.renderIntoDocument()).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.\n\n' +
+ 'Each child in a list should have a unique "key" prop.\n\n' +
'Check the render method of `Child`.',
);
});
diff --git a/packages/react-dom/src/__tests__/ReactMultiChildText-test.js b/packages/react-dom/src/__tests__/ReactMultiChildText-test.js
index 360860c00cadb..2785bd03045e4 100644
--- a/packages/react-dom/src/__tests__/ReactMultiChildText-test.js
+++ b/packages/react-dom/src/__tests__/ReactMultiChildText-test.js
@@ -162,8 +162,8 @@ describe('ReactMultiChildText', () => {
['', 'foo',
, 'foo'], ['', 'foo', , 'foo'],
]);
}).toWarnDev([
- 'Warning: Each child in an array or iterator should have a unique "key" prop.',
- 'Warning: Each child in an array or iterator should have a unique "key" prop.',
+ 'Warning: Each child in a list should have a unique "key" prop.',
+ 'Warning: Each child in a list should have a unique "key" prop.',
]);
});
diff --git a/packages/react-reconciler/src/ReactChildFiber.js b/packages/react-reconciler/src/ReactChildFiber.js
index bed780c2b100a..fd1aa488c6654 100644
--- a/packages/react-reconciler/src/ReactChildFiber.js
+++ b/packages/react-reconciler/src/ReactChildFiber.js
@@ -80,7 +80,7 @@ if (__DEV__) {
child._store.validated = true;
const currentComponentErrorInfo =
- 'Each child in an array or iterator should have a unique ' +
+ 'Each child in a list should have a unique ' +
'"key" prop. See https://fb.me/react-warning-keys for ' +
'more information.' +
getCurrentFiberStackInDev();
@@ -91,7 +91,7 @@ if (__DEV__) {
warning(
false,
- 'Each child in an array or iterator should have a unique ' +
+ 'Each child in a list should have a unique ' +
'"key" prop. See https://fb.me/react-warning-keys for ' +
'more information.',
);
diff --git a/packages/react-reconciler/src/__tests__/ReactFragment-test.js b/packages/react-reconciler/src/__tests__/ReactFragment-test.js
index a742ac0884db8..d6b8b41fc0f2a 100644
--- a/packages/react-reconciler/src/__tests__/ReactFragment-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactFragment-test.js
@@ -709,7 +709,7 @@ describe('ReactFragment', () => {
ReactNoop.render();
expect(ReactNoop.flush).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
+ 'Each child in a list should have a unique "key" prop.',
);
expect(ops).toEqual([]);
@@ -753,12 +753,12 @@ describe('ReactFragment', () => {
ReactNoop.render();
expect(ReactNoop.flush).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
+ 'Each child in a list should have a unique "key" prop.',
);
ReactNoop.render();
expect(ReactNoop.flush).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
+ 'Each child in a list should have a unique "key" prop.',
);
expect(ops).toEqual(['Update Stateful']);
@@ -766,7 +766,7 @@ describe('ReactFragment', () => {
ReactNoop.render();
expect(ReactNoop.flush).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
+ 'Each child in a list should have a unique "key" prop.',
);
expect(ops).toEqual(['Update Stateful', 'Update Stateful']);
diff --git a/packages/react/src/ReactElementValidator.js b/packages/react/src/ReactElementValidator.js
index f25677580ef38..fa83aea4ef28e 100644
--- a/packages/react/src/ReactElementValidator.js
+++ b/packages/react/src/ReactElementValidator.js
@@ -126,7 +126,7 @@ function validateExplicitKey(element, parentType) {
if (__DEV__) {
warning(
false,
- 'Each child in an array or iterator should have a unique "key" prop.' +
+ 'Each child in a list should have a unique "key" prop.' +
'%s%s See https://fb.me/react-warning-keys for more information.',
currentComponentErrorInfo,
childOwner,
diff --git a/packages/react/src/__tests__/ReactChildren-test.js b/packages/react/src/__tests__/ReactChildren-test.js
index 5dc7a9155aa7f..68165197ef12d 100644
--- a/packages/react/src/__tests__/ReactChildren-test.js
+++ b/packages/react/src/__tests__/ReactChildren-test.js
@@ -320,7 +320,7 @@ describe('ReactChildren', () => {
let instance;
expect(() => (instance = {threeDivIterable}
)).toWarnDev(
- 'Warning: Each child in an array or iterator should have a unique "key" prop.',
+ 'Warning: Each child in a list should have a unique "key" prop.',
);
function assertCalls() {
@@ -905,7 +905,7 @@ describe('ReactChildren', () => {
ReactTestUtils.renderIntoDocument(),
).toWarnDev(
'Warning: ' +
- 'Each child in an array or iterator should have a unique "key" prop.' +
+ 'Each child in a list should have a unique "key" prop.' +
' See https://fb.me/react-warning-keys for more information.' +
'\n in ComponentReturningArray (at **)',
);
@@ -926,7 +926,7 @@ describe('ReactChildren', () => {
ReactTestUtils.renderIntoDocument([, ]),
).toWarnDev(
'Warning: ' +
- 'Each child in an array or iterator should have a unique "key" prop.' +
+ 'Each child in a list should have a unique "key" prop.' +
' See https://fb.me/react-warning-keys for more information.',
{withoutStack: true}, // There's nothing on the stack
);
diff --git a/packages/react/src/__tests__/ReactElementClone-test.js b/packages/react/src/__tests__/ReactElementClone-test.js
index 722bff24ee1d5..2220a7b112535 100644
--- a/packages/react/src/__tests__/ReactElementClone-test.js
+++ b/packages/react/src/__tests__/ReactElementClone-test.js
@@ -259,9 +259,7 @@ describe('ReactElementClone', () => {
it('warns for keys for arrays of elements in rest args', () => {
expect(() =>
React.cloneElement(, null, [, ]),
- ).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
- );
+ ).toWarnDev('Each child in a list should have a unique "key" prop.');
});
it('does not warns for arrays of elements with keys', () => {
diff --git a/packages/react/src/__tests__/ReactElementValidator-test.internal.js b/packages/react/src/__tests__/ReactElementValidator-test.internal.js
index 5a17a079bcf5f..d4c7f9bf2a316 100644
--- a/packages/react/src/__tests__/ReactElementValidator-test.internal.js
+++ b/packages/react/src/__tests__/ReactElementValidator-test.internal.js
@@ -42,9 +42,7 @@ describe('ReactElementValidator', () => {
expect(() => {
Component(null, [Component(), Component()]);
- }).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
- );
+ }).toWarnDev('Each child in a list should have a unique "key" prop.');
});
it('warns for keys for arrays of elements with owner info', () => {
@@ -67,7 +65,7 @@ describe('ReactElementValidator', () => {
expect(() => {
ReactTestUtils.renderIntoDocument(React.createElement(ComponentWrapper));
}).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.' +
+ 'Each child in a list should have a unique "key" prop.' +
'\n\nCheck the render method of `InnerClass`. ' +
'It was passed a child from ComponentWrapper. ',
);
@@ -84,7 +82,7 @@ describe('ReactElementValidator', () => {
expect(() => {
ReactTestUtils.renderIntoDocument({divs});
}).toWarnDev(
- 'Warning: Each child in an array or iterator should have a unique ' +
+ 'Warning: Each child in a list should have a unique ' +
'"key" prop. See https://fb.me/react-warning-keys for more information.\n' +
' in div (at **)',
);
@@ -96,7 +94,7 @@ describe('ReactElementValidator', () => {
expect(() => {
ReactTestUtils.renderIntoDocument({divs}
);
}).toWarnDev(
- 'Warning: Each child in an array or iterator should have a unique ' +
+ 'Warning: Each child in a list should have a unique ' +
'"key" prop.\n\nCheck the top-level render call using . See ' +
'https://fb.me/react-warning-keys for more information.\n' +
' in div (at **)',
@@ -117,7 +115,7 @@ describe('ReactElementValidator', () => {
}
expect(() => ReactTestUtils.renderIntoDocument()).toWarnDev(
- 'Warning: Each child in an array or iterator should have a unique ' +
+ 'Warning: Each child in a list should have a unique ' +
'"key" prop.\n\nCheck the render method of `Component`. See ' +
'https://fb.me/react-warning-keys for more information.\n' +
' in div (at **)\n' +
@@ -161,7 +159,7 @@ describe('ReactElementValidator', () => {
};
expect(() => Component(null, iterable)).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
+ 'Each child in a list should have a unique "key" prop.',
);
});
diff --git a/packages/react/src/__tests__/ReactJSXElementValidator-test.js b/packages/react/src/__tests__/ReactJSXElementValidator-test.js
index 24fe79fdb1bf2..0321e5cd228ff 100644
--- a/packages/react/src/__tests__/ReactJSXElementValidator-test.js
+++ b/packages/react/src/__tests__/ReactJSXElementValidator-test.js
@@ -48,9 +48,7 @@ describe('ReactJSXElementValidator', () => {
ReactTestUtils.renderIntoDocument(
{[, ]},
),
- ).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
- );
+ ).toWarnDev('Each child in a list should have a unique "key" prop.');
});
it('warns for keys for arrays of elements with owner info', () => {
@@ -69,7 +67,7 @@ describe('ReactJSXElementValidator', () => {
expect(() =>
ReactTestUtils.renderIntoDocument(),
).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.' +
+ 'Each child in a list should have a unique "key" prop.' +
'\n\nCheck the render method of `InnerComponent`. ' +
'It was passed a child from ComponentWrapper. ',
);
@@ -90,9 +88,7 @@ describe('ReactJSXElementValidator', () => {
expect(() =>
ReactTestUtils.renderIntoDocument({iterable}),
- ).toWarnDev(
- 'Each child in an array or iterator should have a unique "key" prop.',
- );
+ ).toWarnDev('Each child in a list should have a unique "key" prop.');
});
it('does not warn for arrays of elements with keys', () => {