Performance Optimization Tips
For large images, we recommend using expo-image or FastImage.
Avoid rebuilding unchanged data.
Passing a new array is supported and is the correct way to publish list changes. In a parent that rerenders frequently, however, rebuilding an equivalent array can repeat viewer and dimension-reconciliation work. Pass the existing array when no transformation is needed, and memoize only genuinely derived data.
Do not mutate data in place. Replace the array when its contents change:
Keep the render window small unless you need more adjacent pages mounted.
The default windowSize is 3, which mounts the previous, current, and next items. Larger windows can make adjacent pages feel more ready, but they also increase render, memory, and image decode work. The library does not cap windowSize; choosing a large value is an explicit performance tradeoff.
