@amazon-devices/shopify__flash-list library provides a fast and performant list component. FlashList is similar to FlatList provided by React Native. Props supported by FlatList are also supported by FlashList. You can try FlashList by replacing a FlatList component and adding a estimatedItemSize prop. Additionally, FlashList extends the list of supported props by adding additional props to help achieve optimal performance.
This library is system-deployed and available to React Native for Vega apps without a separate installation process. The library is autolinking, which your app links to at runtime. The library is guaranteed to be compatible only with the version of React Native for Vega for which it’s built.
When you uplevel your app’s version of React Native for Vega, consider the best practice of upleveling its library dependencies.
Installation
-
Add the JavaScript library dependency in the
package.jsonfile. -
Reinstall dependencies using the
npm installcommand.
Examples
The following examples use a common dataset and components. Some items have been removed to avoid duplication in examples.FlashList component example
FlashList with infinite scroll example
MasonryFlashList example
MasonryFlashList is the FlashList component with many columns.
API reference
See the documentation page for information about this library and API reference. TheFlashList library covers all of the props supported by the FlatList component. It adds additional props for optimizing performance, as listed below.
Components
Props
FlashList, as FlatList, uses ScrollView under the hood, so it inherits its props.
Known issues and limitations
Not all props supported in React NativeFlatList have an equivalent in FlashList. The following props in React Native aren’t supported by FlashList.
- Unsupported props:
columnWrapperStyledebuglistKeyonScrollToIndexFailedwindowSize
- Unsupported methods:
flashScrollIndicators()hasMoregetChildContextgetNativeScrollRef()getScrollRefgetScrollResponder()
- Props that would bring no value if ported to
FlashListdue to the differences in their underlying implementation:disableVirtualizationgetItemLayoutinitialNumToRendermaxToRenderPerBatchrecordInteractionsetNativePropsupdateCellsBatchingPeriod
- Props that aren’t currently supported on Vega:
refreshControlrefreshing
ItemSeparatorComponent known issue
When using theItemSeparatorComponent, you may experience issues with the JS Thread when scrolling based on Perfetto traces.
Use of the key prop
If you use a key prop, FlashList can’t recycle views, which removes performance optimizations of Flashlist. Therefore, when migrating from React Native FlatList to Flashlist, you should remove any key props from your item components and their nested components.
For example, this code snippet below uses key props in Text and View components.
Flashlist, remove the key props, as shown.
key prop.

