@amazon-devices/shopify__flash-list 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 is a system-deployed library and is available to React Native for Vega apps without a separate installation process. It is deployed as an autolinking library which your app links to at runtime. Compatibility is guaranteed only between the library and the version of React Native for Vega for which it is built.
When you upgrade the version of React Native for Vega upon which your app is built, it is best practice to also upgrade the versions of the libraries that depend on React Native for Vega.
Installation
- Add the JavaScript library dependency in the
package.jsonfile. Select the tab for your React Native version.
- React Native 0.72
- React Native 0.83
- Reinstall dependencies using
npm installcommand.
Examples
The examples below 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
Check out the dedicated documentation page for info about this library, API reference and more. 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.
Implementation details
Not all props supported in React NativeFlatList have an equivalent in FlashList. See the list below of props in React Native that are not 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 implementationdisableVirtualizationgetItemLayoutinitialNumToRendermaxToRenderPerBatchrecordInteractionsetNativePropsupdateCellsBatchingPeriod
- Props that aren’t currently supported on Vega
refreshControlrefreshing
ItemItemSeparatorComponent, you may experience issues with the JS Thread when scrolling based on Perfetto traces.
Use of key prop
When migrating from React NativeFlatList to Flashlist, you should remove any key props from your item components and their nested components. If you use a key prop, FlashList can’t recycle views, which removes performance optimizations of Flashlist.
For example, this code snippet below uses key props in Text and View components.
Flashlist, remove the key props, as shown below.
key prop.

