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

@take-out/native-hot-update

v0.0.51

Published

Minimal, headless React Native hot update library.

Readme

@take-out/native-hot-update

Minimal, headless React Native hot update library.

Features

  • Simple instance-based API
  • Pluggable storage (MMKV, AsyncStorage, custom)
  • Timeout protection (5s + 20s hard limit)
  • Pre-release testing workflow
  • Works with Expo & React Native
  • Zero UI - bring your own components

Installation

bun add @take-out/native-hot-update react-native-mmkv

Quick Start

1. Create Hot Updater Instance

// src/hotUpdater.ts
import { MMKV } from 'react-native-mmkv'
import { createHotUpdater } from '@take-out/native-hot-update'
import { createMMKVStorage } from '@take-out/native-hot-update/mmkv'
import { HotUpdater } from '@hot-updater/react-native'

const mmkv = new MMKV({ id: 'hot-updater' })

const hotUpdaterInstance = createHotUpdater({
  serverUrl: 'https://your-update-server.com',
  storage: createMMKVStorage(mmkv),
  updateStrategy: 'appVersion',
})

// Export the hook and resolver
export const useOtaUpdater = hotUpdaterInstance.useOtaUpdater
export const hotUpdaterResolver = hotUpdaterInstance.createResolver()
export const hotUpdater = hotUpdaterInstance

2. Wrap Your App

// app/index.tsx or App.tsx
import { HotUpdater } from '@hot-updater/react-native'
import { hotUpdaterResolver } from './hotUpdater'

function App() {
  // Your app component
  return <YourApp />
}

// IMPORTANT: You must wrap your app with HotUpdater.wrap
export default HotUpdater.wrap({
  resolver: hotUpdaterResolver,
  updateMode: 'manual', // Use manual mode with custom hooks
})(App)

3. Use in Your App

// app/_layout.tsx
import { useOtaUpdater } from './hotUpdater'

export default function RootLayout() {
  const { userClearedForAccess, progress } = useOtaUpdater({
    enabled: true,
    onUpdateDownloaded: (info) => {
      console.info('Update downloaded:', info.id)
    },
    onError: (error) => {
      console.error('Update failed:', error)
    },
  })

  if (!userClearedForAccess) {
    return <SplashScreen progress={progress} />
  }

  return <YourApp />
}

3. Display Version Info

import { hotUpdater } from './hotUpdater'
import * as Application from 'expo-application'

export function VersionDisplay() {
  const otaId = hotUpdater.getShortOtaId()
  const channel = hotUpdater.getChannel()

  return (
    <Text>
      v{Application.nativeApplicationVersion}
      {otaId && ` (${otaId})`} • {channel}
    </Text>
  )
}

4. Dev Tools

import { hotUpdater } from './hotUpdater'
import { Button, View, Text, Alert } from 'react-native'

export function DevUpdateTools() {
  const handleCheckUpdate = async () => {
    const update = await hotUpdater.checkForUpdate()
    if (update) {
      Alert.alert('Update available', `ID: ${update.id}`, [
        { text: 'Later' },
        { text: 'Reload', onPress: () => hotUpdater.reload() },
      ])
    } else {
      Alert.alert('No update available')
    }
  }

  const handleCheckPreRelease = async () => {
    const update = await hotUpdater.checkForUpdate({
      channel: 'production-pre',
      isPreRelease: true,
    })
    if (update) {
      Alert.alert('Pre-release available', `ID: ${update.id}`, [
        { text: 'Later' },
        { text: 'Reload', onPress: () => hotUpdater.reload() },
      ])
    }
  }

  return (
    <View>
      <Text>Current: {hotUpdater.getAppliedOta() || 'Native build'}</Text>
      <Text>Channel: {hotUpdater.getChannel()}</Text>
      <Button title="Check for Update" onPress={handleCheckUpdate} />
      <Button title="Check Pre-release" onPress={handleCheckPreRelease} />
      <Button title="Reload App" onPress={() => hotUpdater.reload()} />
    </View>
  )
}

API

createHotUpdater(config)

Creates a hot updater instance.

Config:

  • serverUrl (string): Your hot update server URL
  • storage (HotUpdateStorage): Storage adapter for persisting state
  • updateStrategy ('appVersion' | 'fingerprint'): Update strategy (default: 'appVersion')

Returns: HotUpdaterInstance

useOtaUpdater(options?)

React hook for automatic update checking.

Options:

  • enabled (boolean): Enable/disable update checking (default: true)
  • onUpdateDownloaded (function): Callback when update is downloaded
  • onError (function): Callback on error

Returns:

  • userClearedForAccess (boolean): Whether user can access app
  • progress (number): Download progress (0-100)
  • isUpdatePending (boolean): Whether update will apply on restart

Instance Methods

  • checkForUpdate(options?) - Manually check for updates
  • getAppliedOta() - Get current OTA bundle ID
  • getShortOtaId() - Get short OTA ID
  • getIsUpdatePending() - Check if update is pending
  • reload() - Reload app
  • getBundleId() - Get current bundle ID
  • getMinBundleId() - Get minimum bundle ID
  • getChannel() - Get current channel