FRGet In Touch
← Tech stack

React Native

A framework for building native iOS and Android apps with React, from a single codebase.

Type
Mobile app framework
Created by
Meta, open source (MIT license)
Platforms
iOS and Android
In my stack
Offline-first field apps

What it is

React Native uses the same components and the same way of thinking as React, but instead of producing HTML it renders real native views: the same buttons, lists, text inputs and scrolling as an app written in Swift or Kotlin. It is not a website wrapped in an app.

The app logic runs in JavaScript or TypeScript. When it needs the phone itself, such as the camera, GPS, files or a local database, it calls native modules. One codebase is published to both the App Store and Google Play.

Why I use it

One codebase, two platforms. One team, one set of fixes, and every feature lands on iOS and Android the same day. That is a lot less to build and maintain than two separate native apps.

It feels native. Users get their platform’s own controls and gestures, and the app runs well on the mid-range phones field teams actually carry.

It shares a lot with the web. The mobile app and the React dashboard use the same model, the same TypeScript types for the API and often the same validation rules.

Full access to the device. Camera, location, storage and background tasks are there when the app needs them, which is what makes serious offline apps possible.

Where I use it

The employee app of the HR management system is a React Native app. Many employees work on sites with no reliable internet, so the app is offline-first: clock-ins, leave requests and other entries are saved to SQLite on the device first, so nothing is lost and nobody waits for a signal. When the connection comes back, the app syncs with the Go backend.

Best use cases

  • Field and operations apps that must work offline: inspections, audits, maintenance, deliveries, data collection.
  • Internal company apps that need to run on whatever phones staff already have, iPhone or Android.
  • Products that need both platforms at launch on one budget and one timeline.
  • Mobile apps that sit next to a React web app and share types, logic and developers with it.

When I’d use something else

Games and apps built mostly around custom 3D graphics are better served by a game engine or fully native code. And if an app is simple, used occasionally and needs no device features, a responsive web app may be enough: there is nothing to install and no app store review.

A small example

The idea behind an offline-first app, simplified: write to the phone first, send to the server when the network allows.

// Save first: the inspector never waits for the network
async function saveInspection(inspection) {
  await db.run(
    "INSERT INTO inspections (id, data, synced) VALUES (?, ?, 0)",
    [inspection.id, JSON.stringify(inspection)]
  );
}

// Sync later: push everything not yet on the server
async function syncPending() {
  const rows = await db.all("SELECT id, data FROM inspections WHERE synced = 0");
  for (const row of rows) {
    await api.post("/inspections", JSON.parse(row.data));
    await db.run("UPDATE inspections SET synced = 1 WHERE id = ?", [row.id]);
  }
}

A real sync engine also retries failures and resolves conflicts when the same record changed in two places. Each record carries its own ID, so the server can safely receive it twice without creating a duplicate.

Often used with

Need a mobile app that keeps working without internet?

Get in touch and tell me about your project.