react-native-expertise
Installation
SKILL.md
React Native Expertise
FlatList Optimization
To ensure smooth scrolling in FlatList:
- Use
removeClippedSubviews={true}. - Implement
getItemLayoutfor fixed-height items. - Memoize
renderItemusingReact.memooruseCallback. - Use
keyExtractorwith stable unique keys.
import React, { useCallback } from 'react';
import { FlatList, View, Text } from 'react-native';
const Item = React.memo(({ title }) => (
<View style={{ height: 50 }}><Text>{title}</Text></View>
));