Skip to main content

List engine

The grid renders rows through either FlashList or React Native's FlatList. The listMode prop picks which one.

listModeiOSAndroid
'auto' (default)FlashListFlatList
'flash-list'FlashListFlashList
'flat-list'FlatListFlatList
Android uses FlatList by default

With listMode="auto", Android renders through FlatList. Set listMode="flash-list" to use FlashList on both platforms.

Basic usage​

list-engine.tsx
import { DataGrid } from 'expo-flash-datagrid';

import { userColumns, users, type User } from './data';

export function FlashListOnBothPlatforms() {
return (
<DataGrid<User>
mode="client"
rows={users}
columns={userColumns}
listMode="flash-list"
drawDistance={400}
rowHeight={52}
style={{ flex: 1 }}
/>
);
}

Options​

PropTypeDefaultDescription
listMode'auto' | 'flash-list' | 'flat-list''auto'Which list renders the rows.
drawDistancenumberFlashList defaultPixels rendered beyond the viewport. Applies only when FlashList is used, so Android needs listMode="flash-list".
rowHeightnumber44Row height. compact subtracts 8, with a floor of 34.
estimatedItemSizenumberNoneDeprecated and ignored. FlashList v2 measures rows itself. Removed in 1.0.

Raising drawDistance reduces blank rows during very fast scrolls, at the cost of more work per frame.