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

@prelude.so/react-native-sdk

v0.4.0

Published

Prelude SDK for React Native

Readme

Readme

Using the Expo React Native SDK

The Expo React Native SDK allows you to gather device signals and perform silent verification of mobile devices.

Gathering Device Signals

The SDK allows you to capture certain device signals (both in Android and iOS) that will be reported back to Prelude.

It is provided as an Expo module that you can integrate into your React Native Expo Application.

The Android minSdkVersion value in the SDK is set to 26 (Android 8.0). If you application has a lower value you may need to update it.

Configuring the project

First install the SDK dependency in your app:

npm install @prelude.so/react-native-sdk

Then, where ever in your application you want to report the device signals you can use code like this:

...
// Import the react state types
import { useEffect, useState } from "react";
// Import the SDK types
import * as PreludeReactNativeSdk from '@prelude.so/react-native-sdk';
...

// Define a state to receive status updates
const [dispatchStatus, setDispatchStatus] = useState({ dispatchID: "", status: "" });

...
// Subscribe to the event
useEffect(() => {
    const subscription = PreludeReactNativeSdk.onDispatchingSignals((dispatchingSignalsStatus) => {
      console.log("Dispatch status: " + dispatchingSignalsStatus.status + ". Id: " + dispatchingSignalsStatus.dispatchID);
      setDispatchStatus(dispatchingSignalsStatus);
    });

    return () => {
      subscription.remove();
    }
  }, [dispatchStatus]);

...
// Submit the signals in any of your app event handlers (here is a button example)
<Button title={`Dispatch Signals`} onPress={() =>
  PreludeReactNativeSdk.dispatchSignals({
      sdk_key: "YOUR-SDK-KEY"
    })
    .catch((error) => {
        console.log("Dispatch error: " + error);
    })
} />

Then run the Expo application normally (in your application's directory):

npx expo run:ios

or

npx expo run:android

Once you get the dispatch ID through the event, you can report it back to your own API to be forwarded in subsequent network calls.

There is no restriction on when to call this API, you just need to take this action before you need to report back the dispatch ID. It is advisable to make the request early on during the user onboarding process to have the dispatch id available when required.

Silent Verification

The Silent Verification feature allows you to verify a phone number without requiring the user to enter a verification code. It is available for certain carriers and requires a server-side service to handle the verification process.

The SDK provides a simple API to initiate the verification process and handle the response.

We assume here that you have a server-side service that exposes the 2 endpoints, one to start the verification and another to check the final code. In this sample code we expose those endpoints via an Api module that will call each endpoint via a separate function.

When calling the verification API, you will need to provide the phone number to verify. The API will return a request URL that the SDK will navigate to in order to complete the verification process.

// Import the SDK types and your API module
import * as PreludeReactNativeSdk from '@prelude.so/react-native-sdk';
import * as Api from './YourBackendApi';

// Call the verification endpoint with the phone number.
// If the phone number is compatible with the Silent Verification feature, 
// the API will return a request URL that the SDK will navigate to.
const request_url = await Api.verify(phone_number);

// Then call the verifySilent method with the SDK key and the request URL.
// If the verification is successful, the SDK will return a code that you 
// can use to check the verification status.
var code = await PreludeReactNativeSdk.verifySilent({
    sdk_key: sdk_key,
    request_url: request_url,
});

// Finally, call the checkSilent method with the phone number and the code
// Your API should handle the check and return the verification status.
const check_status = await Api.check(phone_number, code);

// Handle the verification status as needed in your application