From 646605b90e666c4b0d1c1200a137eacf62b46f87 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Tue, 9 Jun 2020 16:28:30 -0700 Subject: [PATCH] update nested VList warning to error Summary: This has caused SEVs because the warning has gone unnoticed, so upgrading to error which should be much harder to miss or ignore. https://fb.workplace.com/groups/rn.core/permalink/2680043542227367/ # Changelog [Internal] update nested VList warning to error Reviewed By: TheSavior Differential Revision: D21945364 fbshipit-source-id: 88a9a9ab0b51e0afcf9b25be9854f65a61f419af --- Libraries/Lists/VirtualizedList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index ec03040dc8b88a..9b107b2c2cb2ea 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -1112,9 +1112,10 @@ class VirtualizedList extends React.PureComponent { this.context == null ) { // TODO (T46547044): use React.warn once 16.9 is sync'd: https://github.com/facebook/react/pull/15170 - console.warn( + console.error( 'VirtualizedLists should never be nested inside plain ScrollViews with the same ' + - 'orientation - use another VirtualizedList-backed container instead.', + 'orientation because it can break windowing and other functionality - use another ' + + 'VirtualizedList-backed container instead.', ); this._hasWarned.nesting = true; }