Awesome-omni-skill mobile_react_native
React Native best practices, hooks, navigation ve performance optimization.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/mobile_react_native" ~/.claude/skills/diegosouzapw-awesome-omni-skill-mobile-react-native && rm -rf "$T"
manifest:
skills/development/mobile_react_native/SKILL.mdsource content
📱 Mobile React Native
React Native best practices ve performance optimization.
📁 1. Proje Yapısı
src/ ├── components/ │ ├── common/ # Reusable │ └── screens/ # Screen components ├── hooks/ # Custom hooks ├── services/ # API, storage ├── store/ # State (Zustand) ├── navigation/ └── App.tsx
⚡ 2. Performance
// FlatList optimizasyonu <FlatList data={items} keyExtractor={(item) => item.id} removeClippedSubviews={true} maxToRenderPerBatch={10} windowSize={5} getItemLayout={(data, index) => ({ length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index, })} /> // Memoization const Component = React.memo(({ data }) => { }); const callback = useCallback(() => {}, [deps]); const value = useMemo(() => compute(), [deps]);
🔐 3. Secure Storage
// ❌ AsyncStorage güvenli değil // ✅ SecureStore kullan import * as SecureStore from 'expo-secure-store'; await SecureStore.setItemAsync('token', userToken); const token = await SecureStore.getItemAsync('token');
🧭 4. Navigation
type RootStackParamList = { Home: undefined; Profile: { userId: string }; }; const Stack = createNativeStackNavigator<RootStackParamList>();
📦 5. State (Zustand)
import { create } from 'zustand'; import { persist } from 'zustand/middleware'; const useAuthStore = create( persist( (set) => ({ user: null, login: (user) => set({ user }), logout: () => set({ user: null }), }), { name: 'auth-storage' } ) );
📱 6. Platform-Specific
import { Platform } from 'react-native'; const padding = Platform.select({ ios: 20, android: 0 }); // Dosya bazlı: Button.ios.tsx, Button.android.tsx
Mobile React Native v1.1 - Enhanced
🔄 Workflow
Kaynak: React Native Performance Guide & Expo Guideline
Aşama 1: Setup & Architecture
- Framework: Expo (Managed Workflow) ile başla,
v3 kullan.expo-router - State: Zustand veya TanStack Query ile server/client state ayrımını yap.
- Styling: NativeWind (Tailwind) veya Restyle ile tutarlı tasarım sistemi kur.
Aşama 2: Performance Optimization
- Lists:
yerineFlatList
(Shopify) kullan (5x performans).FlashList - Images:
ile caching ve blurhash desteği ekle.expo-image - Bundle:
engine'i aktifleştir ve bundle size analizi yap.Hermes
Aşama 3: Native Modules & Release
- Native: Gerekirse Custom Native Module (Turbo Modules) yaz.
- Updates:
ile store onayı beklemeden OTA (Over-the-Air) güncelleme yap.expo-updates - Profiling: Flipper veya React DevTools ile FPS ve Memory Leak kontrolü yap.
Kontrol Noktaları
| Aşama | Doğrulama |
|---|---|
| 1 | UI thread (JS thread) 60fps'in altına düşüyor mu? |
| 2 | Uygulama boyutu (APK/IPA) optimize edildi mi? |
| 3 | Android ve iOS davranışları (Navigation, Keyboard) tutarlı mı? |