6
ReactNative ListView component calculates how many rows to render on initial component mount using initialListSizeproperty. By default the initialListSize
is set to 10.
For reference, See the below function from ReactNative ListView source code,
var DEFAULT_INITIAL_ROWS = 10;
getDefaultProps: function() {
return {
initialListSize: DEFAULT_INITIAL_ROWS,
pageSize: DEFAULT_PAGE_SIZE,
renderScrollComponent: props => ,
scrollRenderAheadDistance: DEFAULT_SCROLL_RENDER_AHEAD,
onEndReachedThreshold: DEFAULT_END_REACHED_THRESHOLD,
stickyHeaderIndices: [],
};
}
If you want to make ListView render all items by default then you can make use of initialListSize
property in ListView component like below code
{
return (
{rowData}
)
}
}/>