Skip to Content
React Native16. AnnexesA. Cheatsheet web → RN

Annexe A — Cheatsheet web → React Native

Le dictionnaire complet, en tableaux. Chaque ligne pointe vers le chapitre qui détaille.

Éléments

WebReact NativeVoir
div, section, headerView3.1
span, p, h1-h6, strong, emText (+ variantes AppText, imbrication)3.1, 4.5
imgImage / expo-image (dimensions requises si URI)3.2
button, a (action)Pressable (+ android_ripple, hitSlop)3.3
a href (navigation interne)<Link href> (Expo Router)5.1
a href (externe)Linking.openURL()9.5
inputTextInput (onChangeText, keyboardType)3.5
input type=checkbox / toggleSwitch6.4
selectPas de natif universel — ActionSheet, modal maison, ou lib
ul scrollable / liste de donnéesFlatList (virtualisée, obligatoire)3.4
conteneur overflow: autoScrollView (contenu borné seulement)3.6
formÉtat contrôlé + bouton (pas de submit natif)3.5
tableViews en flexbox (ou lib)
svgreact-native-svg10.3
video / audioexpo-video / expo-audio9.3
iframe / WebViewreact-native-webview, DOM components15.4
dialog / modalRoute presentation: 'modal', ou Modal core5.4

CSS

WebReact NativeVoir
Fichier .css / classNameObjets StyleSheet — ou className via NativeWind4.1, 4.4
px, rem, emNombres nus = dp ; % OK4.1
display: flexDéfaut de toute View (column !)4.2
display: gridflexWrap + calculs, ou numColumns de FlatList4.2, 3.6
:hover, :activeÉtat pressed de Pressable / active: NativeWind3.3, 4.4
Media queriesuseWindowDimensions + conditions JS3.6
prefers-color-schemeuseColorScheme / dark: NativeWind4.3, 4.4
box-shadowelevation (Android) + shadow* (iOS) — ou boxShadow RN 0.76+4.1
position: fixed/stickyHeader de navigation, stickyHeaderIndices4.2
z-index globalzIndex entre frères ; Modal/portal sinon4.1
Transitions/animations CSSReanimated (withTiming/withSpring, Layout Animations)P10
Héritage de policeAucun — composant AppText4.5
gapgap (identique !)4.2

APIs & environnement

WebReact NativeVoir
fetchfetch (sans CORS, timeout à gérer)7.1
localStorageAsyncStorage (+ persist Zustand)6.4
IndexedDB / SQLexpo-sqliteP8
window.location / routerExpo Router (router.push, params)P5
document.titleStack.Screen options={{ title }}5.1
navigator.shareShare.share() / expo-sharing9.4
navigator.clipboardexpo-clipboard9.4
Notification APIexpo-notifications (locales ≠ push)9.2
navigator.onLineNetInfo (isInternetReachable)7.1
window.matchMediauseWindowDimensions, useColorScheme3.6
Service worker / PWA offlineCache Query persisté + assets bundlés7.4
visibilitychangeAppState6.1
Cookies / sessionTokens en header (pas de cookies fiables)7.1
console.logIdem (terminal Metro, DevTools j)2.4
DevTools navigateurReact Native DevTools + element inspector2.4

Outillage & déploiement

Web (Next.js)React Native (Expo)Voir
next devnpx expo start (+ Expo Go / dev build)2.1
Turbopack/webpackMetro2.1
next.config.tsapp.config.ts (+ config plugins)11.3
NEXT_PUBLIC_*extra + expo-constants (rien de secret !)11.3
next buildeas build / expo run:androidP12
Déployer (Vercel)APK sideload / Play Store / EAS Update (OTA)P12-13
vercel.json envsProfils eas.json (development/preview/production)11.2
DomainePackage name (IMMUABLE)12.1
favicon/manifestIcône adaptative + splash (cuits au build)12.1
Lighthouse/APMPerf monitor, profiler React, Sentry, Android vitals14.5, 13.6