React Native β bu Meta tomonidan yaratilgan framework boβlib, JavaScript va TypeScript yordamida native mobil ilovalar yaratish imkonini beradi.
Expo esa React Native ustiga qurilgan ecosystem boβlib, development jarayonini tezlashtiradi.

Agar siz yangi boshlayotgan boβlsangiz yoki professional darajaga chiqmoqchi boβlsangiz, quyidagi stack juda muhim:
β‘ React Native β‘ Expo β‘ TypeScript β‘ Expo Router β‘ React Navigation β‘ Zustand β‘ TanStack Query β‘ NativeWind β‘ Reanimated β‘ Firebase β‘ Node.js backend
ββββββββββββββββββ
π± Expo Go nima?
Expo Go β bu telefoningizda React Native loyihangizni tez test qilish uchun ishlatiladigan ilova.
Siz:
- Kompyuterda loyiha ochasiz
- Expo server ishga tushadi
- QR code chiqadi
- Telefon orqali scan qilasiz
- Ilova ochiladi
Boshlash:
npx create-expo-app my-project
Papka ichiga kirish:
cd my-project
Ishga tushirish:
npx expo start
Keyin telefon:
Expo Go β Scan QR β App ishlaydi
ββββββββββββββββββ
π¦ Expo loyihasining asosiy strukturasi:
my-project
app/
βββ index.tsx
βββ profile.tsx
βββ settings.tsx
components/
βββ Button.tsx
βββ Card.tsx
hooks/
lib/
assets/
package.json
Zamonaviy Expo loyihalarda Expo Router ishlatiladi.
Misol:
app/index.tsx
bu:
/
route boβladi.
app/profile.tsx
bu:
/profile
boβladi.
ββββββββββββββββββ
π¨ UI yaratish
React Native HTML emas.
Web:
<div>
<h1>Hello</h1>
</div>
React Native:
<View>
<Text>
Hello
</Text>
</View>
Asosiy komponentlar:
View
Container uchun:
<View>
</View>
Text
Matn:
<Text>
UlugDev
</Text>
Image:
<Image
source={{
uri:"https://image.com/photo.png"
}}
/>
Button:
<Button
title="Click"
/>
ββββββββββββββββββ
π¨ Styling
React Native CSS emas.
Misol:
<View
style={{
backgroundColor:"#000",
padding:20,
borderRadius:20
}}
>
<Text
style={{
color:"#fff",
fontSize:24
}}
>
Hello
</Text>
</View>
Ammo professional loyihalarda:
NativeWind ishlatiladi.
Oβrnatish:
npm install nativewind
Ishlatish:
<View className="flex-1 bg-black">
<Text className="text-white text-xl">
UlugDev
</Text>
</View>
ββββββββββββββββββ
π§ Navigation
Mobil ilovalarda eng muhim qism.
Masalan:
Home
β
Profile
β
Settings
React Navigation:
npm install
@react-navigation/native
Stack:
<Stack.Navigator>
<Stack.Screen
name="Home"
component={Home}
/>
<Stack.Screen
name="Profile"
component={Profile}
/>
</Stack.Navigator>
Oβtish:
navigation.navigate(
"Profile"
)
ββββββββββββββββββ
π Expo Router
Yangi standart:
npx expo install expo-router
Misol:
app
(index).tsx
profile.tsx
settings.tsx
Link:
<Link href="/profile">
Profile
</Link>
Bu Next.js App Router ga oβxshaydi.
ββββββββββββββββββ
πΎ Local Storage
User ma'lumotlarini saqlash:
npx expo install
@react-native-async-storage/async-storage
Saqlash:
await AsyncStorage.setItem(
"user",
JSON.stringify(user)
)
Olish:
const data =
await AsyncStorage.getItem(
"user"
)
Masalan:
Login qilgan user:
{
id:1,
name:"Ulugbek"
}
telefon xotirasida saqlanadi.
ββββββββββββββββββ
π Secure Storage
Token uchun oddiy storage ishlatmang.
Expo SecureStore:
npx expo install
expo-secure-store
Token:
await SecureStore.setItemAsync(
"token",
jwt
)
Keyin:
const token =
await SecureStore.getItemAsync(
"token"
)
ββββββββββββββββββ
π‘ API bilan ishlash
Professional app backend bilan ishlaydi.
Axios:
npm install axios
API:
const response =
await axios.get(
"https://api.com/users"
)
POST:
axios.post(
"/login",
{
email,
password
}
)
ββββββββββββββββββ
β‘ TanStack Query
Server state uchun.
npm install
@tanstack/react-query
Misol:
useQuery({
queryKey:["users"],
queryFn:getUsers
})
Afzalligi:
β cache
β loading
β error
β refetch
ββββββββββββββββββ
Davomi tez kunda :
π₯ React Native architecture π₯ Zustand state management π₯ Authentication π₯ Firebase realtime chat π₯ Image upload π₯ Push notification π₯ App Store / Play Store release π₯ Production project structure
#ReactNative #Expo #MobileDevelopment #TypeScript #Frontend #Developer

Discussion0
No comments yet.