diff --git a/Libraries/CustomComponents/Lists/FlatList.js b/Libraries/CustomComponents/Lists/FlatList.js index 2f7bd153638..77ca170845c 100644 --- a/Libraries/CustomComponents/Lists/FlatList.js +++ b/Libraries/CustomComponents/Lists/FlatList.js @@ -242,6 +242,11 @@ class FlatList extends React.PureComponent, vo } componentWillReceiveProps(nextProps: Props) { + invariant( + nextProps.numColumns === this.props.numColumns, + 'Changing numColumns on the fly is not supported. Change the key prop on FlatList when ' + + 'changing the number of columns to force a fresh render of the component.' + ); this._checkProps(nextProps); }