npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@measuresh/react-native

v0.1.1

Published

Mobile apps break, get to the root cause faster

Readme

React Native SDK for measure.sh

Mobile apps break, get to the root cause faster.

Measure is an open source tool to monitor mobile apps. This package contains the React Native SDK which helps instrumenting your app easily.

Some features include:

  • Capture JS crashes and native crashes automatically
  • Monitor app health metrics such as launch times, crash rates and app sizes
  • Get screenshots with crash reports
  • View full event timelines of sessions with auto-tracked user interactions, navigation events, http calls, cpu usage, memory usage and more for deeper context
  • Collect bug reports directly from users and manage them on the dashboard
  • Optimize performance with traces
  • Track custom events with additional business specific attributes
  • Track handled exceptions explicitly

Integration

Install the SDK

Go to measure.sh, create an app and generate your API key and API URL. Then install the package:

npm install @measuresh/react-native

Expo

The easiest way to integrate Measure in an Expo app is via the config plugin. Add the plugin to your app.json or app.config.js:

{
  "expo": {
    "plugins": [
      [
        "@measuresh/react-native",
        {
          "androidApiKey": "YOUR_ANDROID_API_KEY",
          "androidApiUrl": "YOUR_ANDROID_API_URL",
          "iosApiKey": "YOUR_IOS_API_KEY",
          "iosApiUrl": "YOUR_IOS_API_URL"
        }
      ]
    ]
  }
}

Then run prebuild to apply the plugin:

npx expo prebuild

The plugin automatically:

  • Adds the native iOS and Android SDKs
  • Injects API credentials
  • Initializes the SDK in AppDelegate (iOS) and MainApplication (Android)
  • Adds MeasureOkHttpApplicationInterceptor for automatic HTTP tracking on Android
  • Sets up a build phase to upload symbol files after each iOS Release build

Vanilla React Native

Android

Add the API key and URL to your AndroidManifest.xml:

<application>
    <meta-data android:name="sh.measure.android.API_KEY" android:value="YOUR_API_KEY"/>
    <meta-data android:name="sh.measure.android.API_URL" android:value="YOUR_API_URL"/>
</application>

Add the Gradle plugin to your project-level build.gradle:

buildscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath("sh.measure.android.gradle:sh.measure.android.gradle.gradle.plugin:0.13.0")
    }
}

Add the SDK dependency and apply the plugin in your app-level build.gradle:

dependencies {
    implementation("sh.measure:measure-android:0.18.0")
}

apply plugin: "sh.measure.android.gradle"

Register MeasurePackage in MainApplication.kt:

import sh.measure.rn.MeasurePackage

override fun getPackages(): List<ReactPackage> {
    val packages = PackageList(this).packages
    packages.add(MeasurePackage())
    return packages
}

iOS

Add the pod to your Podfile:

pod 'MeasureReactNative', :path => '../node_modules/@measuresh/react-native'

Initialize the SDK in AppDelegate.swift:

import MeasureSDK

// inside application(_:didFinishLaunchingWithOptions:)
MeasureReactNative.initialize(
    apiKey: "YOUR_API_KEY",
    apiUrl: "YOUR_API_URL",
    config: BaseMeasureConfig(enableFullCollectionMode: true)
)

Or in AppDelegate.mm (Objective-C):

#import <MeasureReactNative/MeasureReactNative.h>

// inside application:didFinishLaunchingWithOptions:
[MeasureReactNative initializeWithApiKey:@"YOUR_API_KEY"
                                  apiUrl:@"YOUR_API_URL"];

To upload symbol files after each Release build, add a Run Script phase in Xcode after the "Bundle React Native code and images" phase:

export SOURCEMAP_FILE="$(pwd)/main.jsbundle.map"
"$SRCROOT/../node_modules/@measuresh/react-native/scripts/upload_build_phase.sh" "YOUR_API_URL" "YOUR_API_KEY"

Initialize the SDK

After native setup, initialize Measure in your JavaScript entry point:

import { Measure, MeasureConfig } from '@measuresh/react-native';

Measure.init({
  config: new MeasureConfig({}),
});

Verify Installation

Launch the app with the SDK integrated and navigate through a few screens. Data is sent to the server periodically, so it may take a few seconds to appear. Check the Usage section in the dashboard or navigate to the Sessions tab to see sessions being tracked.

Documentation

Checkout our documentation to learn more about Measure.