Performance Optimization Tips
Wrap the renderItem function with useCallback to prevent unnecessary re-renders.
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:
