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

react-native-check-updates

v0.1.9

Published

Simple way to check for new version

Readme

react-native-check-updates

React Native library for handling in-app updates on Android (Google Play Store) and version checking on iOS.

Installation

npm install react-native-check-updates react-native-nitro-modules

> `react-native-nitro-modules` is required as this library relies on [Nitro Modules](https://nitro.margelo.com/).

Usage

import { checkForUpdate, startUpdate, completeUpdate, onProgress } from 'react-native-check-updates';

// Check for available updates
const updateInfo = await checkForUpdate({ bundleId: 'com.example.app' });

if (updateInfo) {
  console.log('Update available:', updateInfo.version);
  console.log('Release notes:', updateInfo.releaseNotes);
  
  // Start the update process
  const updateStarted = await startUpdate({ mode: 'flexible' });
  
  // Monitor download progress (flexible updates only)
  onProgress((percent) => {
    console.log(`Download progress: ${percent}%`);
  });
  
  // Complete the update after download (flexible updates only)
  if (updateStarted) {
    await completeUpdate();
  }
}

API Reference

checkForUpdate(options)

Checks if an update is available for your app.

Parameters:

  • options (object, optional)
    • bundleId (string, optional): The bundle ID to check for updates. If not provided, uses the current app's bundle ID.

Returns: Promise<UpdateInfo | null> - Returns update information if available, or null if no update is available.

UpdateInfo object:

interface UpdateInfo {
  version?: string;              // Human-readable version string
  versionCode?: number;          // Android version code
  availableVersionCode?: number; // Available version code
  updatePriority?: number;       // Update priority (0-5, higher is more urgent)
  releaseNotes?: string;         // Release notes for the update
  appUrl?: string;               // URL to the app store listing
}

startUpdate(options)

Starts the in-app update process (Android only).

Parameters:

  • options (object, optional)
    • mode (string): Update mode, either 'immediate' or 'flexible'
      • immediate: Forces users to update immediately, blocking app usage
      • flexible: Allows users to continue using the app while the update downloads

Returns: Promise<boolean> - Returns true if the update process was started successfully.

completeUpdate()

Completes a flexible update after it has been downloaded (Android only). This should be called after the flexible update download is complete.

Returns: Promise<boolean> - Returns true if the update was completed successfully.

onProgress(callback)

Sets up a progress listener for flexible updates (Android only).

Parameters:

  • callback (function): A function that receives the download progress percentage (0-100)

Example:

onProgress((percent) => {
  console.log(`Download progress: ${percent}%`);
  // Update your UI with the progress
});

Platform Support

  • Android: Full support for in-app updates via Google Play Store
  • iOS: Version checking only (you need to implement your own iTunes API integration)

Contributing

License

MIT


Made with create-react-native-library