Créer une app mobile avec React Native : guide de démarrage 2025
React Native permet de créer des applications Android et iOS avec un seul codebase JavaScript.
Pourquoi React Native ?
- Un code, deux plateformes : Android et iOS depuis le même projet
- JavaScript/TypeScript : le langage le plus populaire
- Performances proches du natif avec le New Architecture
- Communauté massive : 100k+ stars sur GitHub
Installation
# Créer un nouveau projet
npx react-native@latest init MonApp
# Démarrer sur Android
npx react-native run-android
# Démarrer sur iOS (Mac uniquement)
npx react-native run-ios
Votre premier écran
import React from 'react';
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
export default function HomeScreen() {
return (
<View style={styles.container}>
<Text style={styles.title}>Bienvenue 🚀</Text>
<TouchableOpacity style={styles.button}>
<Text style={styles.buttonText}>Commencer</Text>
</TouchableOpacity>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
title: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 24,
},
button: {
backgroundColor: '#007AFF',
paddingHorizontal: 32,
paddingVertical: 16,
borderRadius: 12,
},
buttonText: {
color: '#fff',
fontSize: 16,
fontWeight: '600',
},
});
Prochaines étapes
- Navigation : React Navigation
- State management : Zustand ou Redux Toolkit
- Appels API : Axios + React Query
- Authentification : Firebase Auth
📱 Ziri Dev développe vos apps Android et iOS.
📣 t.me/ZiriDevFR
Top comments (0)