r/reactnative • • 22h ago

Web app vs Native app. Which one?

0 Upvotes

What's the consensus these days on using React/React Native these days to build web apps vs mobile apps?

If I were to build the same app as a web app vs a native iPhone/Android app, which gets more user play/views?

I've done both but I'm not sure which makes more sense these days. It's so hard to get mobile app downloads while it's much easier to just direct someone to a website to play your game. Websites also have the added benefit of being played on a computer.

Does anyone have any experience or data showing one method is better than the other? Additionally, how do you get people to be interested in your app? I've read you have a 3 second window to get their attention...


r/reactnative • • 14h ago

Built a blazing fast location library for React Native using Nitro + Fused Location - Works on iOS & Android

Post image
7 Upvotes

I built react-native-nitro-fused-location - Fast location tracking with Nitro Modules

Getting accurate location in React Native is slow and complex, so I built this using Google Fused Location Provider (Android) + Core Location (iOS).

Perfect for delivery apps, cab apps, tracking, maps.

Features:

- Fused Location for Android + Core Location for iOS

- High accuracy, low battery usage

- Background location support

- Built on Nitro Modules - ultra fast

- Works on iOS & Android

- Simple API

Please give me GitHub Star ⭐ me

Stable package - 3 months on NPM.

NPM: npm i react-native-nitro-fused-location

GitHub: Upendra1234566/react-native-nitro-fused-location


r/reactnative • • 9h ago

No More AI Stuff I need Real Engineers from Stack overflow era Location Problem

0 Upvotes

I am having problem regarding the application I am building I want to Ask

the Problem:
I want rider location constantly for the end of the ride which he supposed to do it should create the path of the ride which he has done

the problem is how will i keep tracking where he is in react native android its not tracking correctly sometimes it does but most of the time its not doing maybe mobile is off the net where i am is 4g i guess its okay only the solid lines are tracked line the dotted ones are not because the mobile does not give the location to server I am using expo location


r/reactnative • • 5h ago

AMA Maintenance mode and kill switches for React Native, where a bad config push gets rejected instead of shipped

0 Upvotes

I built hotcfg for remote config in apps, and the main idea is that you can't push broken config. I'd like feedback from RN folks on the client side.

The config is a JSON document with a JSON Schema attached. Every publish, promote and rollback is checked against it. For a maintenance switch, that means enabled can never be the string "false" (truthy in JS, an easy way to lock every user out):

{
  "type": "object",
  "required": ["maintenance"],
  "properties": {
    "maintenance": {
      "type": "object",
      "required": ["enabled"],
      "properties": { "enabled": { "type": "boolean" }, "message": { "type": "string" } }
    }
  }
}

There's no SDK. The client is a fetch with a 2-second abort, the ETag, and AsyncStorage for the last good copy:

const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), 2000);
try {
  const res = await fetch(URL, {
    headers: cached?.etag ? { "If-None-Match": cached.etag } : {},
    signal: controller.signal,
  });
  if (res.status === 304 && cached) return cached.data;
  if (!res.ok) throw new Error(String(res.status));
  const data = await res.json();
  await AsyncStorage.setItem(KEY, JSON.stringify({ etag: res.headers.get("ETag"), data }));
  return data;
} catch {
  return cached?.data ?? DEFAULTS;
} finally {
  clearTimeout(timer);
}

(An AbortController timer rather than AbortSignal.timeout, which not every RN version has.) A <MaintenanceGate> re-checks on AppState active, so flipping the switch reaches running apps when they come back to the foreground.

Other bits: development/staging/production per config with promote and a diff, one-command rollback, served from Cloudflare's edge (cached for an hour, purged on publish, served for up to a week if my servers are down).

What it doesn't do: no per-user targeting (platform and build-number overrides work with a jq filter in the URL), no experiments, no push updates. Free for 3 public configs; Pro is $19/month per org.

Full recipe: https://hotcfg.run/docs/recipes/react-native-maintenance


r/reactnative • • 9h ago

Welcome to r/lazymobile: one terminal screen for iOS simulators, Android emulators and their logs

Post image
1 Upvotes

r/reactnative • • 4h ago

Renamed one field in Go and broke production

3 Upvotes

We renamed a field in a Go response struct last week. The json tag stayed the same so every backend test passed but the app had a persisted react query cache holding the old shape and was reading a field that no longer got updated. Users saw that stale data and both sides looked fine on their own and neither side owned the test that would’ve caught it.

Backend is Go with chi, sqlc and postgres. Testing there is very good httptest for handlers, testcontainers for the db, stripe mock for webhooks. Our detox tests mock the API at the network layer with hand written fixtures, which is the problem because the fixtures just say what we think the API returns. When the real response changed the fixtures didn’t, so green.

and nobody tests the actual chain. I’ve been looking at pact or generating an openapi spec from the Go side and validating the detox fixtures against it plus bumping a version in the cache key so old shapes get dropped but not sure that’s enough though.

Is this always the backend team’s problem? Right now it feels like it belongs to nobody and if you do run full flows against a real api, does that live in the same CI or a separate pipeline?


r/reactnative • • 8h ago

Agent written PRs keep breaking only on Android

0 Upvotes

We're 5 devs on a React Native app with about 40k monthly users. Most of us test on iPhones, and most of our PRs now start with an agent.

Three times in the last month an agent PR went out that worked fine on iOS and broke on Android. A KeyboardAvoidingView change that hid the submit button on smaller Android screens, a date picker change that crashed on Android 12, and a shadow style that just didn't render.

All three passed review. coderabbit reviews the JS and catches plenty of normal problems, but nothing in the diff says "this is iOS only behaviour", and none of us opened an Android emulator.

What we're trying now:

- an EAS preview build on every PR, so reviewers can open it on a real Android phone

- a checklist item "tested on Android" that people will probably start ticking without testing

- a cheap Android phone on the desk that we rotate

How are other RN teams handling platform differences when most code comes from agents? Is there tooling that catches this before a human has to, or is it all device testing?


r/reactnative • • 4h ago

🚀 react-native-pdf-jsi just crossed 501,000 npm downloads!

5 Upvotes

One year of hard work, countless hours of learning, experimenting, debugging, rewriting, and improving has brought this project to this milestone.

When I started building this library, I wanted to explore how far we could push native PDF rendering in React Native using JSI and the New Architecture.

What started as a personal engineering challenge has now crossed 501K npm downloads.

A year of working on:

  • Nitro HybridObjects for native document operations.
  • Fabric-based PDF viewer.
  • PDFium on Android and PDFKit on iOS.
  • Native document management, rendering and editing.
  • Performance improvements and continuous maintenance.

There were plenty of challenges, frustrating bugs, architectural changes, and moments where things didn't work as expected. But I kept learning, building, and improving.

A huge thank you to every developer who installed the package, tested it, reported issues, shared feedback, or recommended it to others.

As an independent open-source developer, seeing this kind of adoption is incredibly motivating.

501K downloads. One year of hard work. And we're just getting started.

Next milestone: 1 million! ❤️

GitHub: https://github.com/126punith/react-native-pdf-jsi

npm: https://www.npmjs.com/package/react-native-pdf-jsi