Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit 0b1999a · 15 days ago

Expo, Part 1: Why Expo and React Native Instead of Native Development or Flutter

🌐 Machine-translated from Russian. Show original

In this part:

Task#

The portal itgov.kz has a Next.js site with private messages. Users asked the app to open correspondence faster and receive notifications. Resources is a small team of web developers, without separate Android and iOS engineers. One app for both platforms was needed, written by the same people who create the site.

That's how Kommit Chat" and, previously, the "WorkTime" app for tracking working time appeared. Both appeared at Expo.

Variants#

ApproachLanguageProsCons
NativelyKotlin (Android), Swift (iOS),maximum performance, all new platform APIstwo codes, two commands, twice as expensive
FlutterDarta single codebase, its own rendering, predictable UI,a new language for the web team, a separate ecosystem,
React Native + ExpoTypeScript/JavaScript, Reactone codebase, familiar with React, common logic with the web, cloud build,complex native functionality requires modules; application size larger than native
PWA (web app)webzero storesiOS limitations, worse push, no "real" app in the

What is Expo#

React Native is Meta's framework: you write in React, and on the screen are true native Android and iOS components.

Expo is a platform on top of React Native:

PartWhat gives
Expo SDKdozens of ready-made modules: camera, notifications, secure storage, files, geolocation. Versions are coordinated
expo-routerfile navigation like in Next.js: file app/chat/[id].tsx is the screen /chat/123
Config pluginsnative settings (permissions, icons, Firebase) — in app.json, without manual editing in Android Studio and Xcode
EAS Buildcloud build APK/AAB and IPA — no Mac needed to build for iOS
EAS Submitsend the build to Google Play and the App Store from the command line
EAS Updatean over-the-air JS code update without a new publication in the
Expo Pusha unified notification API for Android (FCM) and iOS (APNs)

The Expo SDK and React Native itself are open source and free. EAS (cloud services) has a free plan with build limits and paid plans — check current limits and prices on expo.dev/pricing.

Expo Go and development build#

  • Expo Go is a ready-made app from the store where you can open your project using a QR code. Convenient for initial experiments, but the set of native modules is fixed. For example, remote push notifications on Android in Expo Go do not work with SDK 53.
  • Development build — your own debug build with the necessary modules. For a real project, work only with it: in Kommit Chat," push and secure storage are checked exactly like that.

Where Expo is not the best choice#

  • heavy 3D graphics and games (preferably game engines);
  • applications that consist almost entirely of low-level work with Bluetooth, background services, or specific hardware — maybe, but you will have to write native modules;
  • the team already has strong Kotlin and Swift developers.

For typical business applications — chats, accounting, applications, catalogs, personal accounts — Expo completes tasks faster and cheaper.

What we achieved#

Kommit Chat"
Expo SDKversion 58, React Native 0.88, TypeScript
Navigationexpo-router with protected
Screenslogin, dialogues, messages with pictures, new dialogue, complaints, settings, account deletion,
Real-timeServer-Sent Events from the
Expo Push notifications → FCM/APNs, without text messages
EASBuild: APK for testers, AAB for Google Play

Series plan#

  1. Why Expo — this article.
  2. Project: expo-router, token login and secure storage — Expo, part 2: project on expo-router — navigation, login, and secure token storage.
  3. Push notifications and privacy — Expo, part 4: push notifications — expo-notifications, FCM V1, APNs, and privacy.
  4. Publishing on Google Play and the App Store — Expo, part 6: publishing on Google Play and the App Store — accounts, testing, account deletion, and data questionnaires;
  • Android phone (for iOS tests — iPhone and paid Apple Developer account);
  • free expo.dev account;
  • backend with API — for us, this is the portal itself on Next.js.

Let's start: Expo, part 2: project on expo-router — navigation, login, and secure token storage.

Comments 00 участников · 0 гостей🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.