Loading...
Loading...
React Native lets you build native iOS and Android apps using React. You share ~90% of your codebase between platforms while keeping truly native performance — no WebView.
Expo is the fastest way to start a React Native project:
npx create-expo-app@latest MyApp
cd MyApp
npx expo startScan the QR code with the Expo Go app on your phone to see your app instantly.
React Native has its own set of components instead of HTML tags:
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'
export default function Card({ title, onPress }: { title: string; onPress: () => void }) {
return (
<View style={styles.card}>
<Text style={styles.title}>{title}</Text>
<TouchableOpacity style={styles.button} onPress={onPress}>
<Text style={styles.buttonText}>Read More</Text>
</TouchableOpacity>
</View>
)
}
const styles = StyleSheet.create({
card: {
backgroundColor: '#fff',
borderRadius: 12,
padding: 16,
marginBottom: 12,
shadowColor: '#000',
shadowOpacity: 0.1,
shadowRadius: 8,
elevation: 3,
},
title: { fontSize: 18, fontWeight: '600', marginBottom: 8 },
button: { backgroundColor: '#3858f6', borderRadius: 8, padding: 10 },
buttonText: { color: '#fff', textAlign: 'center', fontWeight: '600' },
})Expo Router brings file-based routing to React Native (just like Next.js):
app/
├── _layout.tsx # Root layout
├── index.tsx # / (home tab)
├── (tabs)/
│ ├── explore.tsx # /explore
│ └── profile.tsx # /profile
└── post/
└── [id].tsx # /post/:id
// app/(tabs)/_layout.tsx
import { Tabs } from 'expo-router'
import { Ionicons } from '@expo/vector-icons'
export default function TabLayout() {
return (
<Tabs>
<Tabs.Screen
name="index"
options={{ title: 'Home', tabBarIcon: ({ color }) => <Ionicons name="home" color={color} size={24} /> }}
/>
<Tabs.Screen
name="profile"
options={{ title: 'Profile', tabBarIcon: ({ color }) => <Ionicons name="person" color={color} size={24} /> }}
/>
</Tabs>
)
}import { useQuery } from '@tanstack/react-query'
import { FlatList, Text, View } from 'react-native'
function PostList() {
const { data, isLoading } = useQuery({
queryKey: ['posts'],
queryFn: () => fetch('https://api.example.com/posts').then(r => r.json()),
})
if (isLoading) return <Text>Loading...</Text>
return (
<FlatList
data={data}
keyExtractor={item => item.id}
renderItem={({ item }) => <Text>{item.title}</Text>}
/>
)
}# Install EAS CLI
npm install -g eas-cli
# Configure your project
eas build:configure
# Build for both platforms
eas build --platform allReact Native with Expo is the best way to build cross-platform mobile apps if you already know React. The ecosystem is mature, the tooling is excellent, and Expo Router makes navigation as easy as Next.js.