Skip to content

Commit

Permalink
update nested VList warning to error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sahrens authored and facebook-github-bot committed Jun 9, 2020
1 parent 345d0c1 commit 646605b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -1112,9 +1112,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
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;
}
Expand Down

0 comments on commit 646605b

Please sign in to comment.