React Native Performance Audit
Target: $1 (or src/ if not specified)
1. List Rendering
grep -rn "map.*return\|\.map(" ${1:-src/} --include="*.tsx" | grep -v "test\|spec" | head -20
- Plain
map()in JSX for lists > 10 items → should useFlatList FlatListwithoutkeyExtractorFlatListwithoutgetItemLayoutfor fixed-height items (prevents scroll optimization)- Missing
removeClippedSubviewsfor long lists
2. Re-render Detection
grep -rn "useState\|useSelector\|useContext" ${1:-src/} --include="*.tsx" | head -20
- Context consumers re-rendering when unrelated state changes
- Inline object/array props (
style={{ margin: 10 }}recreated every render) - Missing
React.memoon list items - Missing
useCallbackon functions passed as props
3. Native Bridge Calls
- Animated values: using JS-driven vs native-driven (
useNativeDriver: true) - Missing
InteractionManager.runAfterInteractionsfor post-navigation heavy work - Synchronous native modules called in render
4. Images
- Missing
resizeModeand explicit dimensions - Not using
FastImagefor remote images - Missing progressive loading for large images
Report with severity and code fix for each finding.