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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hrhk/react-native-codepush

v1.0.33

Published

Custom CodePush Handler

Downloads

544

Readme

@hrhk/react-native-codepush

A lightweight OTA (Over-The-Air) update system for React Native, allowing you to update your JavaScript bundle instantly without # publishing a new version to the Play Store or App Store.

This library supports: Android iOS

Firebase Remote Config S3/HTTPS bundle hosting Zero AppCenter dependency Customizable update modal

🛠 Getting Started

Note: This library assumes you already have a working React Native environment.

If not, follow the official guide: https://reactnative.dev/docs/set-up-your-environment

📦 Installation

Install the module using npm or yarn:

npm

npm install @hrhk/react-native-codepush

yarn

yarn add @hrhk/react-native-codepush

iOS Setup

From your iOS folder, install CocoaPods:

cd ios pod install

🚀 Usage

Import the component: import CodePushUpdateAlert from '@hrhk/react-native-codepush';

remoteConfig = { otaVersion: 1, immediate: true/false, content: { "title": "", "description": "" }, BUNDLE_URL: Config.CODEPUSH_URL, button: { download: "Download Update", downloading:'Downloading', installing: 'Installing', relaunching:'Relaunching', }, }

if (remoteConfig?.otaVersion && remoteConfig?.otaVersion > 0) { return ; }

📘 How OTA Works

This library loads a downloaded bundle instead of the bundled JS from the APK/IPA.

  1. The app checks Firebase Remote Config
  2. If a newer OTA version exists: i. Downloads ZIP from S3 ii. Extracts JS bundle + assets iii. Saves them in local storage iv. Restarts the app using native module v. React Native loads the new bundle on next launch

📁 Generating OTA Bundles

Follow these steps every time you want to release a new JS-only OTA update.

1️⃣ Generate Android Bundle:

npx react-native bundle
--platform android
--dev false
--entry-file index.js
--bundle-output ./codepush/android/ota/index.android.bundle
--assets-dest ./codepush/android/ota

A folder will be created: codepush/android/ota/ ├── index.android.bundle └── drawable-xxxx/ └── raw/

2️⃣ Generate iOS Bundle:

npx react-native bundle
--platform ios
--dev false
--entry-file index.js
--bundle-output ./codepush/ios/ota/main.jsbundle
--assets-dest ./codepush/ios/ota

A folder will be created: codepush/ios/ota/ ├── main.jsbundle └── assets/

3️⃣ Prepare ZIP Files

Zip only the ota folder. Naming Convention for Android:

android-{versionName}-{otaVersion}.zip -> android-1.0.1-1.zip

iOS:

ios-{versionName}-{otaVersion}.zip -> ios-1.0-1.zip

Upload ZIP to your public bucket: