Thuta Learning
React Native
BasicMobile Developmentအလယ်အလတ်

Development Environment Setup

React Nativeသင်ခန်းစာ 220 မိနစ်

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Development Environment Setup ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်
  • Accessibility, failure နဲ့ lifecycle cases စမ်းနိုင်ရန်
  • Maintainable, testable နဲ့ performant React Native code ရေးနိုင်ရန်

ရိုးရိုးလေး ရှင်းပြမယ်

Development Environment Setup ကို ရိုးရိုးလေးနားလည်မယ်

Expo က React Native ပေါ်မှာ layer တစ်ခု ထပ်တင်ထားတဲ့ toolchain ဖြစ်ပြီး native code (Xcode, Android Studio) ကို directly touch မလုပ်ဘဲ app ကို run/build/publish လုပ်နိုင်ပါတယ် — beginner အတွက် setup time သိသိသာသာ လျှော့ချပေးပါတယ်။ React Native CLI ကတော့ native module custom ထည့်ချင်တဲ့အခါ full control ပေးပေမယ့် Xcode/Android Studio setup လိုအပ်ပါတယ်။ Expo Go app (phone ထဲ install) ကို သုံးရင် physical device ပေါ်မှာ QR code scan ရုံနဲ့ app ကို live preview လုပ်နိုင်ပါတယ်, emulator/simulator setup လုပ်ဖို့ မလိုအပ်တော့ပါဘူး။

Problem → Why → Solution

ပြဿနာ — ဘာကြောင့် ဒီ concept လိုတာလဲ

Node.js install မထားဘဲ npx command run ကြိုးစားပြီး error တက်ခြင်း

ဖြစ်လေ့ရှိတဲ့အမှား

Phone နဲ့ computer ကို Wi-Fi network တူတူ မချိတ်ဘဲ Expo Go scan ကြိုးစားခြင်း (connect မဖြစ်နိုင်)

Core Concept — အလုပ်လုပ်ပုံကိုနားလည်မယ်

Development Environment Setup ကို React Native 0.87, React 19.2, Hermes V1, Fabric renderer, TurboModules နဲ့ Strict TypeScript API တို့ဆက်နွယ်နေသော cross-platform system အဖြစ်နားလည်ပါ။ Shared JavaScript/TypeScript code နဲ့ platform-specific native behavior တို့၏ boundary ကိုရှင်းပါ။

Mental Model
  1. JavaScript state
  2. Native component + layout
  3. Android / iOS UI

Development Environment Setup ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်

အဓိက Syntax / Pattern

bash
# Create a new Expo project
npx create-expo-app my-first-app
cd my-first-app

# Start the development server
npx expo start

# Scan the QR code with the Expo Go app on your phone

Development Environment Setup ကို React Native 0.87, React 19.2, Hermes V1, Fabric renderer, TurboModules နဲ့ Strict TypeScript API တို့ဆက်နွယ်နေသော cross-platform system အဖြစ်နားလည်ပါ။ Shared JavaScript/TypeScript code နဲ့ platform-specific native behavior တို့၏ boundary ကိုရှင်းပါ။

Code ကို အဆင့်လိုက်ဖတ်မယ်

  1. JavaScript state# Create a new Expo project

    Expo က React Native ပေါ်မှာ layer တစ်ခု ထပ်တင်ထားတဲ့ toolchain ဖြစ်ပြီး native code (Xcode, Android Studio) ကို directly touch မလုပ်ဘဲ app ကို run/build/publish လုပ်နိုင်ပါတယ် — beginner အတွက် setup time သိသိသာသာ လျှော့ချပေးပါတယ်။ React Native CLI ကတော့ native module custom ထည့်ချင်တဲ့အခါ full control ပေးပေမယ့် Xcode/Android Studio setup လိုအပ်ပါတယ်။ Expo Go app (phone ထဲ install) ကို သုံးရင် physical device ပေါ်မှာ QR code scan ရုံနဲ့ app ကို live preview လုပ်နိုင်ပါတယ်, emulator/simulator setup လုပ်ဖို့ မလိုအပ်တော့ပါဘူး။

  2. Native component + layout# Start the development server

    Development Environment Setup ကို React Native 0.87, React 19.2, Hermes V1, Fabric renderer, TurboModules နဲ့ Strict TypeScript API တို့ဆက်နွယ်နေသော cross-platform system အဖြစ်နားလည်ပါ။ Shared JavaScript/TypeScript code နဲ့ platform-specific native behavior တို့၏ boundary ကိုရှင်းပါ။

  3. Android / iOS UI# Scan the QR code with the Expo Go app on your phone

    Development Environment Setup example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။

Execution Flow
  1. JavaScript state
  2. Native component + layout
  3. Android / iOS UI

Success

Development Environment Setup ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်

Failure

Node.js install မထားဘဲ npx command run ကြိုးစားပြီး error တက်ခြင်း

ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်

Expo က React Native ပေါ်မှာ layer တစ်ခု ထပ်တင်ထားတဲ့ toolchain ဖြစ်ပြီး native code (Xcode, Android Studio) ကို directly touch မလုပ်ဘဲ app ကို run/build/publish လုပ်နိုင်ပါတယ် — beginner အတွက် setup time သိသိသာသာ လျှော့ချပေးပါတယ်။ React Native CLI ကတော့ native module custom ထည့်ချင်တဲ့အခါ full control ပေးပေမယ့် Xcode/Android Studio setup လိုအပ်ပါတယ်။ Expo Go app (phone ထဲ install) ကို သုံးရင် physical device ပေါ်မှာ QR code scan ရုံနဲ့ app ကို live preview လုပ်နိုင်ပါတယ်, emulator/simulator setup လုပ်ဖို့ မလိုအပ်တော့ပါဘူး။

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

npx create-expo-app my-app ကို run ရင် project scaffold အသစ် ဖန်တီးပေးပါတယ်။ npx expo start ကို run ရင် terminal ထဲ QR code ပေါ်လာပြီး, phone ထဲ Expo Go app နဲ့ scan လိုက်ရင် app ကို live preview လုပ်နိုင်ပါတယ် — code ကို save လိုက်တိုင်း phone ပေါ်မှာ hot reload ဖြစ်ပါလိမ့်မယ်။

Code နမူနာ

bash
# Create a new Expo project
npx create-expo-app my-first-app
cd my-first-app

# Start the development server
npx expo start

# Scan the QR code with the Expo Go app on your phone
You should see
Terminal ထဲ QR code ပေါ်လာပြီး Expo Go app နဲ့ scan လိုက်ရင် app ကို phone ပေါ်မှာ တွေ့ရမည်။

၅ မိနစ် စမ်းကြည့်

npx create-expo-app my-first-app ကို run ကြည့်ပါ။ Expo Go app ကို phone ပေါ် install လုပ်ပြီး QR code scan ကြည့်ပါ။

သတိလေးတစ်ချက်

Expo Go app က Expo project အတွက်ပဲ အလုပ်လုပ်ပါတယ် — custom native module ထည့်ထားတဲ့ project (React Native CLI) ကို preview လုပ်ဖို့ development build လိုအပ်ပါတယ်။

Real-world usage

လက်တွေ့ Project မှာ ဘယ်လိုသုံးမလဲ

Development Environment Setup example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။

Mini challenge

ကိုယ်တိုင်တည်ဆောက်ကြည့်ပါ

Development Environment Setup example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။

  • Example ကို copy မလုပ်ဘဲ ပြန်ရေးပါ
  • Normal input နဲ့ edge case စမ်းပါ
  • Run မလုပ်မီ compiler/output result ကိုခန့်မှန်းပါ
bash
# Create a new Expo project
npx create-expo-app my-first-app
cd my-first-app

# Start the development server
npx expo start

# Scan the QR code with the Expo Go app on your phone

ရလဒ်: Development Environment Setup ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်

အရိပ်အမြွက် ကြည့်ရန်

Development Environment Setup example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။

Quick Quiz 1 / 3

Development Environment Setup ရဲ့ အဓိကသဘောတရားက ဘာလဲ။

Quick Quiz 2 / 3

ဘယ်အမှားကို အရင်ဆုံးရှောင်သင့်လဲ။

Quick Quiz 3 / 3

Real project မှာ ဘယ်လိုအသုံးချသင့်လဲ။

ဒီသင်ခန်းစာမှာ မှတ်ထားရမယ့်အချက်များ

  • JavaScript state → Native component + layout → Android / iOS UI
  • Development Environment Setup ကို React Native 0.87, React 19.2, Hermes V1, Fabric renderer, TurboModules နဲ့ Strict TypeScript API တို့ဆက်နွယ်နေသော cross-platform system အဖြစ်နားလည်ပါ။ Shared JavaScript/TypeScript code နဲ့ platform-specific native behavior တို့၏ boundary ကိုရှင်းပါ။
  • Node.js install မထားဘဲ npx command run ကြိုးစားပြီး error တက်ခြင်း
  • Development Environment Setup example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။

React Native 0.87 Release — React Native

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Node.js install မထားဘဲ npx command run ကြိုးစားပြီး error တက်ခြင်း
  • Phone နဲ့ computer ကို Wi-Fi network တူတူ မချိတ်ဘဲ Expo Go scan ကြိုးစားခြင်း (connect မဖြစ်နိုင်)
  • Simulator တစ်ခု၏ happy path မှန်ရုံဖြင့် real devices, release builds, permissions, accessibility, offline နဲ့ lifecycle paths အားလုံးမှန်ပြီဟုယူဆခြင်း။

လက်တွေ့လေ့ကျင့်ခန်း

Development Environment Setup example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။

အလုပ်ဖြစ်ကြောင်း ဒီလိုသိမယ်: Terminal ထဲ QR code ပေါ်လာပြီး Expo Go app နဲ့ scan လိုက်ရင် app ကို phone ပေါ်မှာ တွေ့ရမည်။

နောက်ဆုံးပြင်ဆင်ရက်

Progress ကို ဤ browser (ဤစက်) တွင်သာ သိမ်းထားပါသည်။ အခြားစက်များနှင့် sync မလုပ်ပါ။

ဤသင်ခန်းစာတွင် အမှားတွေ့ပါက အကြောင်းကြားရန်သင့် email app ကို ဤသင်ခန်းစာလိပ်စာ ဖြည့်ပြီးသားဖြင့် ဖွင့်ပေးပါမည် — သင်ကိုယ်တိုင် ပို့မှသာ ပို့မည်ဖြစ်သည်။

Development Environment Setup | Thuta Learning