Complete the code to import FlatList from React Native.
import { [1] } from 'react-native';
The FlatList component is imported from react-native to efficiently render large lists.
Complete the code to provide data to FlatList using the correct prop.
<FlatList data=[1] renderItem={({item}) => <Text>{item}</Text>} />The data prop is used to pass the array of items to FlatList.
Fix the error in the keyExtractor prop to avoid warnings about missing keys.
<FlatList data={myData} renderItem={({item}) => <Text>{item.name}</Text>} keyExtractor={item => item[1] />The keyExtractor should return a unique string key, usually the id of the item.
Fill both blanks to enable FlatList to render only visible items and improve performance.
<FlatList data={items} renderItem={renderItem} initialNumToRender=[1] maxToRenderPerBatch=[2] />Setting initialNumToRender to 10 and maxToRenderPerBatch to 50 helps FlatList render only a small batch of items at a time, improving efficiency.
Fill all three blanks to implement FlatList with windowSize and removeClippedSubviews for better memory use.
<FlatList data={data} renderItem={renderItem} windowSize=[1] removeClippedSubviews=[2] keyExtractor={item => item.[3] />Setting windowSize to 5 and removeClippedSubviews to true helps FlatList keep only visible items in memory. The keyExtractor uses 'id' for unique keys.