---
title: "Speeding up Expensify's networking with NitroFetch"
url: https://daily.dev/posts/speeding-up-expensify-s-networking-with-nitrofetch-9arh53bt6
source_url: https://margelo.com/blog/speeding-up-expensifys-networking-with-nitro-fetch
type: article
source: "Nitro Modules"
published: 2026-08-25T17:21:25.735Z
updated: 2026-08-25T17:29:39.961Z
tags: ["performance", "networking", "react-native"]
reading_time: 15
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Speeding up Expensify's networking with NitroFetch

**[Nitro Modules](https://daily.dev/sources/margelo)** · 15 min read · 0 upvotes · 0 comments

## Summary

A detailed case study on migrating Expensify's React Native app to NitroFetch, a drop-in fetch() replacement built on Nitro Modules that routes requests through Cronet on Android and URLSession on iOS. Beyond the straightforward global fetch replacement, the integration covered startup prefetching of the critical ReconnectApp request via prefetchOnAppStart, native token-refresh for authenticated prefetches, account-scoped prefetch keys to avoid leaking cached responses across sessions, and reimplementing certificate pinning against Cronet since it doesn't inherit OkHttp or Android Network Security Config pins. Results: average request duration dropped 15-30%, and warm startup P50 improved by 267ms (15.93%) on iOS and 650.5ms (20.18%) on Android.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://margelo.com/blog/speeding-up-expensifys-networking-with-nitro-fetch>

## Questions this post answers

### How much faster is react-native-nitro-fetch compared to the built-in React Native fetch implementation?

NitroFetch reduced average request duration by roughly 15-30% compared to the built-in React Native networking stack, depending on the request type and network conditions. It routes requests through Cronet on Android and URLSession on iOS while keeping the same fetch() API, so most apps require little to no code change to adopt it.

_Developers comparing networking stacks for React Native can track benchmarks like this on daily.dev._

### Why doesn't certificate pinning work automatically after switching a React Native app's networking to Cronet on Android?

Cronet owns its own TLS stack and does not automatically inherit certificate pins configured through React Native's OkHttp client or Android's Network Security Configuration file. Expensify had to add a custom certificate-pinning implementation plus a NitroFetch patch that applied its public-key pins directly to NitroFetch's Cronet engines, covering ordinary requests, streaming, prefetches, and token refreshes.

_Teams auditing transport-level security after a networking migration can follow discussions like this on daily.dev._

### How much did startup prefetching improve app launch time in Expensify's React Native app?

Warm app start P50 improved from 1,676ms to 1,409ms on iOS, a 267ms (15.93%) reduction, and from 3,223.5ms to 2,573ms on Android, a 650.5ms (20.18%) reduction. This came from using NitroFetch's prefetchOnAppStart to begin the critical ReconnectApp request natively before the JavaScript bundle finished loading, measured over 100 runs each on an iPhone 14 Pro and Samsung Galaxy S10e.

_Engineers optimizing mobile app startup latency can find measurement approaches like this on daily.dev._

## Similar posts on daily.dev

- [From skeptic to convert: how Fieldy adopted Expo for their AI wearable](https://daily.dev/posts/from-skeptic-to-convert-how-fieldy-adopted-expo-for-their-ai-wearable-q783wl8vk) · Expo Blog · 0 upvotes · 0 comments
- [From latency to instant: Modernizing GitHub Issues navigation performance](https://daily.dev/posts/from-latency-to-instant-modernizing-github-issues-navigation-performance-t1jb6lu6h) · GitHub Blog · 14 upvotes · 1 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#networking](https://daily.dev/tags/networking), [#react-native](https://daily.dev/tags/react-native)

[View this post on daily.dev](https://daily.dev/posts/speeding-up-expensify-s-networking-with-nitrofetch-9arh53bt6)
