Trung BìnhReact Native iconReact Native

OTA updates — Expo Updates / EAS Update / CodePush — option nào 2026?

OTA (Over-The-Air) update cho phép push JS bundle mới mà không cần build/upload App Store/Play Store. User mở app → background fetch bundle → hot-swap.

Microsoft CodePush (legacy):
- Tool đầu tiên phổ biến (~2015).
- Deprecated: Microsoft thông báo retire CodePush tháng 3/2025. Migrate sang EAS Update hoặc tự host.

Expo Updates (expo-updates library):
- Built-in trong Expo bare/managed.
- Self-host: bundle + manifest serve qua S3/Cloudflare → app fetch.
- Free, control hoàn toàn, nhưng phải tự build pipeline.

EAS Update (recommend 2026):
- Managed service từ Expo team.
- Channel-based: production, staging, preview → release per channel.
- Rollback 1-click qua dashboard.
- Branch theo runtime version (đổi native code phải rebuild app).
- Tích hợp EAS Build → bundle build → publish update cùng pipeline.
- Free tier: 1000 MAU; paid $99/month team với unlimited.

Pattern triển khai:

ts
import * as Updates from 'expo-updates'

async function checkForUpdate() {
  const update = await Updates.checkForUpdateAsync()
  if (update.isAvailable) {
    await Updates.fetchUpdateAsync()
    await Updates.reloadAsync()
  }
}

Pitfall:
- OTA chỉ update JS bundle + assets. Native code (ios//android/) đổi → phải build mới + submit store.
- App Store policy: OTA cho phép, nhưng không được dùng để bypass review (vd thay đổi feature lớn → reject).
- Test rollback trên production trước khi push global.

Xem toàn bộ React Native cùng filter theo level & chủ đề con.

Mở danh sách React Native