Guide condensé pour maîtriser React Native et réussir votre entretien technique. Concepts essentiels, nouvelle architecture, différences avec React web, patterns mobiles et exemples pratiques pour une révision efficace en 2025.
🚨 URGENT - Compatibilité Android 14/15 (Juillet 2025) :
- 📆 31 août 2025 : Google bloque les mises à jour Play Store pour apps sans
targetSdkVersion ≥ 34 - ✅ React Native 0.74+ requis pour compatibilité Android 14/15
- ❌ RN 0.73 ou moins : migration obligatoire
Points essentiels à retenir :
- Architecture : Bridge (legacy) vs JSI + Fabric (nouvelle architecture)
- Composants natifs : View, Text, ScrollView, FlatList
- Navigation : React Navigation stack, tabs, drawer
- Styling : Flexbox, StyleSheet, responsive design
- APIs natives : AsyncStorage, Camera, Geolocation
- Performance : FlatList, lazy loading, native modules
- Mise à jour : RN 0.74+ pour Android 14/15 compatibility
1. Fondamentaux React Native
Voici le diagramme de l'architecture React Native montrant la communication entre la couche JavaScript et les plateformes natives iOS et Android.
Différences clés React vs React Native
// ❌ React Web - Éléments HTML
const WebComponent = () => (
<div style={{ padding: 20 }}>
<h1>Titre</h1>
<p>Paragraphe</p>
<button onClick={handleClick}>Cliquer</button>
</div>
);
// ✅ React Native - Composants natifs
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
const NativeComponent: React.FC = () => (
<View style={styles.container}>
<Text style={styles.title}>Titre</Text>
<Text style={styles.paragraph}>Paragraphe</Text>
<TouchableOpacity style={styles.button} onPress={handlePress}>
<Text style={styles.buttonText}>Appuyer</Text>
</TouchableOpacity>
</View>
);
const styles = StyleSheet.create({
container: { padding: 20 },
title: { fontSize: 24, fontWeight: 'bold' },
paragraph: { fontSize: 16, marginVertical: 10 },
button: {
backgroundColor: '#007AFF',
padding: 12,
borderRadius: 8,
alignItems: 'center'
},
buttonText: { color: 'white', fontWeight: 'bold' }
});
Interface asynchrone entre JavaScript et code natif. Sérialise/désérialise les données JSON. Remplacé par JSI dans la nouvelle architecture.
Metro est le bundler RN optimisé pour mobile. Support du Hot Reloading natif et transformations spécifiques mobile.
Expo = environnement managé, CLI = accès complet aux APIs natives. Le choix dépend du niveau de contrôle requis.
Thread séparé pour React/Redux. UI thread pour rendu natif. Communication via Bridge (legacy) ou JSI (new arch).
2. Nouvelle Architecture React Native
⚡ Nouvelle Architecture activée par défaut depuis RN 0.76
La nouvelle architecture remplace le Bridge asynchrone par des interfaces synchrones et performantes.
🔴 Ancienne Architecture (Bridge)
Utilisée jusqu'à RN 0.75
- Bridge asynchrone : Communication JS ↔ Native via JSON
- Sérialisation coûteuse : Conversion données à chaque appel
- Threading limité : JS Thread séparé mais bloquant
- Layout asynchrone : Effets de "jump" visibles
- Performance limitée : Goulot d'étranglement Bridge
Composants clés :
- Bridge (communication)
- Yoga (layout engine)
- Metro (bundler)
- JavaScript VM
🟢 Nouvelle Architecture (JSI + Fabric)
Par défaut depuis RN 0.76
- JSI (JavaScript Interface) : Accès direct mémoire C++
- Fabric Renderer : Rendu synchrone et optimisé
- TurboModules : Modules natifs lazy-loaded
- Layout synchrone : Pas d'effets visuels intermédiaires
- Performance native : Suppression overhead sérialisation
Composants clés :
- JSI (interface directe)
- Fabric (nouveau renderer)
- TurboModules
- Hermes (JS engine optimisé)
Migration vers la nouvelle architecture
// ✅ Activation de la nouvelle architecture
// 1. Android - android/gradle.properties
newArchEnabled=true
// 2. iOS - ios/Podfile
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
// 3. Code adapté à la nouvelle architecture
import { TurboModuleRegistry } from 'react-native';
// TurboModule moderne (remplace NativeModules)
const MyNativeModule = TurboModuleRegistry.get('MyNativeModule');
// Hook optimisé pour JSI
const useNativeFeature = () => {
const [data, setData] = useState(null);
useEffect(() => {
// Appel synchrone via JSI (plus rapide)
const result = MyNativeModule?.getSyncData();
setData(result);
}, []);
return data;
};
// ✅ Fabric Renderer - Layout synchrone
const LayoutComponent: React.FC = () => {
const [width, setWidth] = useState(0);
const onLayout = (event: LayoutChangeEvent) => {
const { width } = event.nativeEvent.layout;
// Nouvelle arch : pas de "jump", layout immédiat
setWidth(width);
};
return (
<View onLayout={onLayout}>
<Text>Largeur mesurée : {width}px</Text>
{/* Rendu synchrone, pas d'effet visuel intermédiaire */}
{width > 300 && <Text>Écran large détecté</Text>}
</View>
);
};
3. Composants natifs essentiels
📌 À retenir : FlatList vs ScrollView
- ScrollView = "tout charger d'un coup" (comme ouvrir une longue page PDF)
- FlatList = "chargement à la volée" (comme une pagination invisible)
FlatList optimisée - Pattern incontournable
// ✅ FlatList performante avec TypeScript
interface User {
id: string;
name: string;
email: string;
avatar: string;
}
const UserItem = React.memo<{ user: User; onPress: (user: User) => void }>(({ user, onPress }) => (
<TouchableOpacity
style={styles.userItem}
onPress={() => onPress(user)}
activeOpacity={0.7}
>
<Image source={{ uri: user.avatar }} style={styles.avatar} />
<View style={styles.userInfo}>
<Text style={styles.userName}>{user.name}</Text>
<Text style={styles.userEmail}>{user.email}</Text>
</View>
</TouchableOpacity>
));
const UserList: React.FC<{ users: User[] }> = ({ users }) => {
const handleUserPress = useCallback((user: User) => {
console.log('User pressed:', user.name);
}, []);
const renderUser = useCallback(({ item }: { item: User }) => (
<UserItem user={item} onPress={handleUserPress} />
), [handleUserPress]);
const getItemLayout = useCallback((data: any, index: number) => ({
length: 80, // Hauteur fixe pour optimisation
offset: 80 * index,
index,
}), []);
return (
<FlatList
data={users}
renderItem={renderUser}
keyExtractor={(item) => item.id}
getItemLayout={getItemLayout}
removeClippedSubviews={true}
maxToRenderPerBatch={10}
windowSize={10}
initialNumToRender={15}
/>
);
};
View est le composant conteneur de base RN. Pas de propriétés HTML (onClick → onPress).
Tout texte doit être dans un <Text>. Pas de string directement dans View.
ScrollView rend tout. FlatList virtualise (meilleur pour listes > 50 items).
Évite les encoches iPhone. Utiliser sur écrans complets uniquement.
4. Navigation
Navigation typée complète
// Types de navigation strictement typés
export type RootStackParamList = {
Auth: undefined;
Main: undefined;
Profile: { userId: string };
Settings: { section?: string };
};
export type TabParamList = {
Home: undefined;
Search: { query?: string };
Notifications: undefined;
Profile: undefined;
};
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
const Stack = createStackNavigator<RootStackParamList>();
const Tab = createBottomTabNavigator<TabParamList>();
// Composant Tabs avec icônes
const MainTabs: React.FC = () => (
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName: string;
switch (route.name) {
case 'Home':
iconName = focused ? 'home' : 'home-outline';
break;
case 'Search':
iconName = focused ? 'search' : 'search-outline';
break;
default:
iconName = 'circle';
}
return <Icon name={iconName} size={size} color={color} />;
},
tabBarActiveTintColor: '#007AFF',
tabBarInactiveTintColor: 'gray',
headerShown: false,
})}
>
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="Search" component={SearchScreen} />
<Tab.Screen name="Notifications" component={NotificationsScreen} />
<Tab.Screen name="Profile" component={ProfileScreen} />
</Tab.Navigator>
);
// Navigation principale
const AppNavigator: React.FC = () => {
const { isAuthenticated } = useAuth();
return (
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
{!isAuthenticated ? (
<Stack.Screen name="Auth" component={AuthScreen} />
) : (
<>
<Stack.Screen name="Main" component={MainTabs} />
<Stack.Screen
name="Profile"
component={ProfileDetailScreen}
options={{
headerShown: true,
presentation: 'modal',
}}
/>
</>
)}
</Stack.Navigator>
</NavigationContainer>
);
};
5. Styling et layout mobile
Flexbox et responsive design
// ✅ Layout responsive avec Flexbox
import { Dimensions, Platform } from 'react-native';
const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = Dimensions.get('window');
const ResponsiveComponent: React.FC = () => {
const isTablet = SCREEN_WIDTH > 768;
const isIOS = Platform.OS === 'ios';
return (
<View style={[styles.container, isTablet && styles.tabletContainer]}>
<View style={styles.header}>
<Text style={styles.title}>Responsive Layout</Text>
</View>
<View style={styles.content}>
<View style={[styles.card, { width: SCREEN_WIDTH * 0.9 }]}>
<Text>Carte adaptative</Text>
</View>
</View>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1, // Prend tout l'espace disponible
backgroundColor: '#f5f5f5',
},
tabletContainer: {
flexDirection: 'row', // Layout horizontal pour tablettes
},
header: {
paddingTop: Platform.OS === 'ios' ? 50 : 25, // Status bar
paddingHorizontal: 20,
paddingBottom: 20,
backgroundColor: 'white',
...Platform.select({
ios: {
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 8,
},
android: {
elevation: 4,
},
}),
},
title: {
fontSize: 24,
fontWeight: '600',
color: '#333',
},
content: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 20,
},
card: {
backgroundColor: 'white',
borderRadius: 12,
padding: 20,
minHeight: 100,
justifyContent: 'center',
alignItems: 'center',
// Ombres multiplateformes
...Platform.select({
ios: {
shadowOffset: { width: 0, height: 4 },
shadowOpacity: 0.15,
shadowRadius: 12,
},
android: {
elevation: 8,
},
}),
},
});
flexDirection: 'column' (vs 'row' en web). justifyContent aligne sur l'axe principal.
Density-independent pixels (dp). Pas de rem/em/%. Dimensions.get() pour écran.
Styles spécifiques iOS/Android. Gère les différences d'ombres, polices, espacements.
Optimise les styles (validation, performances). Meilleur que les objets inline.
6. APIs natives essentielles
🚨 Sécurité - Gestion des données sensibles :
- SecureStore : Stockage chiffré (tokens, passwords)
- Keychain/Keystore : Biométrie, certificats
- SSL Pinning : Sécuriser les communications API
- Obfuscation : Protection du code JavaScript
Intégration Camera + Permissions
// Installation : npm install react-native-image-picker
import { launchImageLibrary, launchCamera, MediaType } from 'react-native-image-picker';
import { check, request, PERMISSIONS, RESULTS } from 'react-native-permissions';
interface CameraHookResult {
image: string | null;
loading: boolean;
takePhoto: () => Promise<void>;
selectFromLibrary: () => Promise<void>;
}
const useCamera = (): CameraHookResult => {
const [image, setImage] = useState<string | null>(null);
const [loading, setLoading] = useState(false);
const checkCameraPermission = async (): Promise<boolean> => {
const permission = Platform.OS === 'ios'
? PERMISSIONS.IOS.CAMERA
: PERMISSIONS.ANDROID.CAMERA;
let result = await check(permission);
if (result === RESULTS.DENIED) {
result = await request(permission);
}
return result === RESULTS.GRANTED;
};
const takePhoto = async () => {
const hasPermission = await checkCameraPermission();
if (!hasPermission) {
Alert.alert('Permission requise', 'Accès caméra nécessaire');
return;
}
setLoading(true);
launchCamera(
{
mediaType: 'photo' as MediaType,
quality: 0.8,
maxWidth: 1024,
maxHeight: 1024,
},
(response) => {
setLoading(false);
if (response.assets && response.assets[0]) {
setImage(response.assets[0].uri || null);
}
}
);
};
const selectFromLibrary = async () => {
setLoading(true);
launchImageLibrary(
{
mediaType: 'photo' as MediaType,
quality: 0.8,
selectionLimit: 1,
},
(response) => {
setLoading(false);
if (response.assets && response.assets[0]) {
setImage(response.assets[0].uri || null);
}
}
);
};
return { image, loading, takePhoto, selectFromLibrary };
};
AsyncStorage avec hooks
// Hook réutilisable pour AsyncStorage
import AsyncStorage from '@react-native-async-storage/async-storage';
const useAsyncStorage = <T>(key: string, initialValue: T) => {
const [storedValue, setStoredValue] = useState<T>(initialValue);
const [loading, setLoading] = useState(true);
useEffect(() => {
loadStoredValue();
}, []);
const loadStoredValue = async () => {
try {
const item = await AsyncStorage.getItem(key);
if (item) {
setStoredValue(JSON.parse(item));
}
} catch (error) {
console.error(`Error loading ${key}:`, error);
} finally {
setLoading(false);
}
};
const setValue = async (value: T) => {
try {
setStoredValue(value);
await AsyncStorage.setItem(key, JSON.stringify(value));
} catch (error) {
console.error(`Error saving ${key}:`, error);
}
};
const removeValue = async () => {
try {
setStoredValue(initialValue);
await AsyncStorage.removeItem(key);
} catch (error) {
console.error(`Error removing ${key}:`, error);
}
};
return { storedValue, setValue, removeValue, loading };
};
7. Performance et optimisations
Optimisations FlatList avancées
// ✅ FlatList ultra-performante pour grandes listes
const OptimizedFlatList: React.FC<{ data: Item[] }> = ({ data }) => {
const renderItem = useCallback(({ item, index }: { item: Item; index: number }) => (
<MemoizedListItem item={item} index={index} />
), []);
const getItemLayout = useCallback((data: any, index: number) => ({
length: ITEM_HEIGHT,
offset: ITEM_HEIGHT * index,
index,
}), []);
const keyExtractor = useCallback((item: Item) => item.id, []);
return (
<FlatList
data={data}
renderItem={renderItem}
keyExtractor={keyExtractor}
getItemLayout={getItemLayout}
// Optimisations critiques
removeClippedSubviews={true}
maxToRenderPerBatch={10}
updateCellsBatchingPeriod={50}
initialNumToRender={15}
windowSize={10}
// Performance scroll
scrollEventThrottle={16} // 60 FPS
decelerationRate="fast"
// Optimisations mémoire
disableVirtualization={false}
legacyImplementation={false}
/>
);
};
// Item mémorisé avec comparaison personnalisée
const MemoizedListItem = React.memo<{ item: Item; index: number }>(
({ item, index }) => (
<View style={[styles.item, { height: ITEM_HEIGHT }]}>
<Text>{item.title}</Text>
</View>
),
(prevProps, nextProps) => {
return (
prevProps.item.id === nextProps.item.id &&
prevProps.item.title === nextProps.item.title &&
prevProps.index === nextProps.index
);
}
);
8. Compatibilité Android 14/15
🚨 DEADLINE CRITIQUE : 31 août 2025
Google bloque les mises à jour Play Store pour toute app qui ne cible pas au minimum targetSdkVersion = 34 (Android 14).
🧬 Compatibilité Android par version RN :
| Version React Native | API 34 (Android 14) | API 35 (Android 15) | Gradle 8.x |
|---|---|---|---|
| 0.71 ou moins | ❌ Non | ❌ Non | ❌ |
| 0.72 | ⚠️ Partielle | 🚧 Expérimentale | ❌ |
| 0.73 | ✅ Support API 34 | ⚠️ Tweaks requis | ⚠️ |
| 0.74+ | ✅ Stable | ✅ Préparée | ✅ |
🚀 Migration vers RN 0.74+
// 1. Utiliser Upgrade Helper pour migration
// https://react-native-community.github.io/upgrade-helper/
// 2. Mettre à jour gradle.properties
// android/gradle.properties
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
android.useAndroidX=true
android.enableJetifier=true
# ✅ REQUIS pour Android 14/15
android.compileSdkVersion=34
android.targetSdkVersion=34
android.minSdkVersion=23
# Gradle 8.x
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
// 3. Mettre à jour build.gradle (Module: app)
// android/app/build.gradle
android {
compileSdkVersion 34
defaultConfig {
targetSdkVersion 34
minSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
// 4. Nettoyer et rebuilder
cd android && ./gradlew clean
cd ios && rm -rf build && xcodebuild clean
npx react-native run-android
npx react-native run-ios
8 bis. Compatibilité iOS 17/18 et contraintes App Store
📆 Préparez votre app pour iOS 18 (Automne 2025)
- Minimum requis :
platform :ios, '13.0' - Xcode 15+ ou 16 requis pour SDK iOS 17/18
- AppTrackingTransparency (ATT) obligatoire pour tracking utilisateur
- Bitcode : doit être désactivé (deprecated)
- Nouvelle architecture (JSI/Fabric) stable depuis RN 0.73+
📌 À retenir côté iOS :
- ✔️
ENV['RCT_NEW_ARCH_ENABLED'] = '1'dans lePodfile - ✔️ Bitcode désactivé dans
post_install - ✔️ Swift >= 5.6 requis pour certaines libs natives
- ✔️ APIs sensibles :
Keychain,ATT,Push Notifications - ✔️ Modules à tester : Geolocation, BackgroundFetch, Linking iOS
📄 Exemple de Podfile pour iOS 17+
# ios/Podfile
platform :ios, '13.0'
# Active la nouvelle architecture
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
# Désactive Bitcode (Apple l'a déprécié)
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
9. Build & Deploy
Comparaison Expo vs CLI - Guide de choix
// 🤔 Comment choisir entre Expo et CLI ?
// ✅ CHOISIR EXPO MANAGED si :
- Premier projet React Native
- Prototypage rapide
- APIs natives simples (camera, location, notifications)
- Équipe sans expertise iOS/Android native
- Besoin d'OTA updates
// ✅ CHOISIR CLI REACT NATIVE si :
- Libs natives spécifiques requises
- Performance critique (jeux, apps complexes)
- Intégration avec code natif existant
- Contrôle total sur le build
- APIs système avancées
// 📊 Comparaison concrète
EXPO MANAGED WORKFLOW:
// package.json
{
"dependencies": {
"expo": "~49.0.0",
"expo-camera": "~13.4.4",
"expo-location": "~16.1.0"
}
}
// Installation simple
$ npx create-expo-app MyApp
$ cd MyApp
$ npx expo start
REACT NATIVE CLI:
// package.json
{
"dependencies": {
"react-native": "0.74.6",
"react-native-camera": "^4.2.1",
"@react-native-community/geolocation": "^3.0.6"
}
}
// Setup complexe
$ npx react-native init MyApp
$ cd MyApp
// iOS: ouvrir Xcode, configurer signing
// Android: setup SDK, émulateur
$ npx react-native run-ios
$ npx react-native run-android
10. Tests et validation
Pourquoi tester une app RN ? : stabilité, régressions, confiance avant publication
Tests unitaires JS/TS, mocking simple, snapshots, coverage
Tests UI : simulate user input, test feedback visuel, accessibilité
Tests end-to-end natifs, interactions réelles, CI-friendly
Mock de modules (API, caméra, géoloc) via jest.mock()
Stratégies de tests React Native
// ✅ Test unitaire avec Jest
import { render, fireEvent } from '@testing-library/react-native';
import { UserCard } from '../UserCard';
describe('UserCard', () => {
it('should display user name and handle press', () => {
const mockUser = { id: '1', name: 'John Doe', email: 'john@example.com' };
const mockOnPress = jest.fn();
const { getByText } = render(
<UserCard user={mockUser} onPress={mockOnPress} />
);
expect(getByText('John Doe')).toBeTruthy();
fireEvent.press(getByText('John Doe'));
expect(mockOnPress).toHaveBeenCalledWith(mockUser);
});
});
// ✅ Mock modules natifs
jest.mock('react-native-camera', () => ({
RNCamera: {
Constants: {
FlashMode: { torch: 'torch' },
Type: { back: 'back', front: 'front' },
},
},
}));
// ✅ Test Detox E2E
describe('App E2E', () => {
beforeAll(async () => {
await device.launchApp();
});
it('should login successfully', async () => {
await element(by.id('email-input')).typeText('user@example.com');
await element(by.id('password-input')).typeText('password123');
await element(by.id('login-button')).tap();
await expect(element(by.id('home-screen'))).toBeVisible();
});
});
11. Questions d'entretien React Native
🟢 Questions Junior React Native
- "Différence principale entre React et React Native ?"
Réponse : React = web (DOM), React Native = mobile (composants natifs). Pas de HTML/CSS mais View/Text + StyleSheet. - "Qu'est-ce que le Bridge dans React Native ?"
Réponse : Interface asynchrone entre JS et code natif dans l'ancienne architecture. Remplacé par JSI dans la nouvelle architecture. - "Différence ScrollView vs FlatList ?"
Réponse : ScrollView rend tous les éléments, FlatList virtualise. FlatList pour listes > 50 items. - "Comment naviguer entre écrans ?"
Réponse : React Navigation, Stack/Tab/Drawer navigators, navigation.navigate('ScreenName').
🟡 Questions Intermédiaires
- "Comment optimiser une FlatList pour 10 000 items ?"
Réponse : getItemLayout, removeClippedSubviews, maxToRenderPerBatch, windowSize, React.memo sur items. - "Nouvelle architecture : qu'est-ce que JSI et Fabric ?"
Réponse : JSI = interface synchrone JS/C++, Fabric = nouveau renderer, TurboModules = modules natifs optimisés. - "Différence useNativeDriver: true vs false dans les animations ?"
Réponse : true = animation sur UI thread (60 FPS), false = JS thread (moins fluide). Limité aux propriétés transform/opacity. - "Expo managed vs CLI React Native : quand choisir quoi ?"
Réponse : Expo pour prototypage/APIs simples, CLI pour libs natives custom/performance critique. - "Compatibilité Android 14/15 : quels sont les enjeux ?"
Réponse : targetSdkVersion ≥ 34 obligatoire depuis août 2025, RN 0.74+ requis, migration Gradle 8.x.
🔴 Questions Senior
- "Architecture d'une app React Native scalable avec offline-first"
Approche : Redux/Zustand + AsyncStorage, cache stratégies, optimistic updates, sync queues, error boundaries. - "Stratégie de migration vers la nouvelle architecture RN ?"
Approche : Audit des dépendances, migration progressive, tests JSI/Fabric, performance monitoring. - "Comment implémenter des animations complexes performantes ?"
Approche : Reanimated 2/3, useSharedValue, worklets, gesture handling, layout animations. - "Comment préparer une app RN pour Android 14/15 en production ?"
Approche : Migration RN 0.74+, audit targetSdk, tests devices réels, CI/CD updates, rollback plan. - "Comment optimiser le bundle size et performance ?"
Approche : Bundle analyzer, tree shaking, lazy loading, image optimization, Hermes, profiling.
💻 Exercices techniques pré-entretien
Exercice 1 : App météo complète
// 🎯 Objectifs techniques à démontrer :
// - Navigation stack + tabs
// - API calls + cache
// - Géolocalisation + permissions
// - FlatList optimisée
// - Animations + loading states
// - Error handling
// - AsyncStorage pour favoris
// - Nouvelle architecture (JSI/Fabric si possible)
SPÉCIFICATIONS :
📱 Écrans :
- Home : météo actuelle + géolocalisation
- Search : recherche villes + FlatList
- Favorites : villes sauvées (AsyncStorage)
- Details : météo 7 jours + graphiques
🔧 APIs :
- OpenWeatherMap API
- Géolocalisation native
- Permissions camera/location
⚡ Performance :
- FlatList virtualisée (recherche villes)
- Images cached
- Animations 60 FPS (loading, transitions)
- Offline support (cache 1h)
// Points d'évaluation en entretien :
✅ Code TypeScript strict
✅ Performance FlatList
✅ Gestion erreurs robuste
✅ UX animations fluides
✅ Architecture clean
✅ Compatibilité Android 14/15
Exercice 2 : Chat en temps réel
// 🎯 Compétences évaluées :
// - WebSocket/Socket.io
// - FlatList inversée (messages)
// - Keyboard handling
// - Real-time updates
// - Message persistence
// - Nouvelle architecture performance
FONCTIONNALITÉS :
💬 Messages :
- Envoi temps réel
- Affichage sender/receiver
- Timestamps
- Status delivery (sent/delivered/read)
📱 UX :
- Keyboard dismiss
- Auto-scroll nouveaux messages
- Pull-to-refresh historique
- Typing indicator
🔧 Technique :
- Socket.io client
- FlatList inverted
- KeyboardAvoidingView
- AsyncStorage persistence
// Questions techniques attendues :
Q: "Comment gérer 1000+ messages dans la FlatList ?"
R: getItemLayout, removeClippedSubviews, pagination, lazy loading
Q: "Gestion de la connexion WebSocket ?"
R: useEffect cleanup, reconnection logic, offline queueing
Q: "Performance du scroll avec nouveaux messages ?"
R: maintainVisibleContentPosition, scrollToEnd animations
Q: "Avantages nouvelle architecture pour chat temps réel ?"
R: JSI pour WebSocket synchrone, Fabric pour rendu optimisé
🎯 À Retenir pour l'entretien React Native 2025
- Nouvelle Architecture : JSI + Fabric = performance native, communication synchrone, TurboModules lazy-loaded
- Compatibilité Android : RN 0.74+ obligatoire pour Android 14/15, targetSdk ≥ 34 avant août 2025
- Architecture legacy : Bridge asynchrone, sérialisation JSON, limitations performance connues
- Composants natifs : View/Text obligatoires, FlatList pour performance, TouchableOpacity pour interactions
- Navigation : React Navigation stack/tabs, navigation typée TypeScript, deep linking
- Styling : StyleSheet.create(), Flexbox mobile, Platform.select(), responsive design
- APIs natives : Permissions first, AsyncStorage, Camera, Geolocation, error handling robuste
- Performance : useNativeDriver animations, FlatList optimisations, bundle size, memory management
- Expo vs CLI : Managed workflow pour prototypage, CLI pour contrôle total native et libs custom
- Debugging : Flipper, React DevTools, Metro bundler, device testing essentiel
- Testing : Jest + Testing Library + Detox, mocks d'APIs natives, E2E sur devices réels
- Migration : Upgrade Helper, audit dépendances, tests progressifs, rollback plan
🚀 Conseil final : L'entretien React Native 2025 évalue votre capacité à créer des apps mobiles performantes avec la nouvelle architecture. Préparez une démo fonctionnelle, expliquez les contraintes mobiles spécifiques, et démontrez votre compréhension de la migration vers RN 0.74+ pour Android 14/15.
🚨 Points critiques 2025 :
- Nouvelle architecture : Expliquer JSI vs Bridge, avantages Fabric
- Android 14/15 : Connaître les requis targetSdk, migration RN 0.74+
- Performance : Démontrer optimisations FlatList, animations 60 FPS
- Migration : Stratégies progressives, tests, rollback plans