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

beeper-inbox-native

v0.2.0

Published

React Native inbox components for Beeper.

Readme

beeper-inbox-native

React Native inbox components for Beeper.

The package uses the client-safe beeper-sdk/widget API and never accepts a server API key. Your backend must mint a short-lived widget session token for the signed-in subscriber.

<BeeperNativeInboxProvider
  projectId={projectId}
  publishableKey={publishableKey}
  sessionToken={sessionToken}
  refreshSessionToken={mintFreshSessionToken}
  subscriber={{ subscriberId: user.id }}
  push={{ token: fcmToken, platform: "android", autoRegister: true }}
>
  <BeeperInboxPanel />
</BeeperNativeInboxProvider>

Handling action presses

When a notification has an actionUrl, the built-in item shows an action button. By default, pressing it opens the URL with Linking.openURL.

To route in-app instead (React Navigation, expo-router), pass onActionPress and return false to skip the default:

<BeeperNativeInboxProvider
  /* … */
  onActionPress={({ actionUrl, item }) => {
    if (actionUrl.startsWith("myapp://")) {
      router.push(routeFromUrl(actionUrl));
      return false; // handled: don't call Linking.openURL
    }
    // anything else (https links, say) falls through to Linking.openURL
  }}
>
  • The handler can be async; resolving to false also skips the default.
  • The press is recorded for click analytics either way, in the background. A failed recording never blocks or cancels the action.
  • If the handler throws, the URL is not opened and the error propagates, so a routing bug surfaces instead of silently falling back to the browser.
  • If no app on the device can open the URL, the press does nothing rather than crashing.

Building your own UI with useBeeperInbox

useBeeperInbox() gives any component inside the provider the live inbox state and its actions, and re-renders when the inbox changes:

import { useBeeperInbox } from "beeper-inbox-native";

function InboxTabIcon() {
  const { unreadCount } = useBeeperInbox();
  return <TabIcon name="bell" badge={unreadCount || undefined} />;
}

function CustomInbox() {
  const { items, loading, refreshing, errorMessage, refresh, markRead, markAllRead, handleActionPress } =
    useBeeperInbox();

  return (
    <FlatList
      data={items}
      keyExtractor={(item) => item._id}
      refreshing={refreshing}
      onRefresh={() => refresh({ silent: true })}
      renderItem={({ item }) => (
        <Row
          item={item}
          onPress={() => markRead(item._id)}
          onAction={() => handleActionPress(item)}
        />
      )}
    />
  );
}

| Field | | | --- | --- | | items, unreadCount | Inbox contents and unread total | | loading, refreshing | First load, and background refresh | | connectionState, errorMessage | "idle" \| "loading" \| "live" \| "error", and the last error | | subscriber | The subscriber record, once loaded | | refresh({ silent? }) | Re-fetch now; silent skips the loading state | | markRead(id), markAllRead() | Mark items read (optimistic) | | registerPushToken(token, options), unregisterPushToken(token) | Manual push device management | | handleActionPress(item) | Run an item's action exactly as the built-in button does, including onActionPress |

Use handleActionPress in custom rows rather than calling Linking.openURL yourself, so click analytics and your onActionPress routing stay consistent with the built-in UI.

useBeeperInbox throws if it is used outside BeeperNativeInboxProvider.

Push tokens

Use a native FCM token for both Android and iOS with the current Beeper push sender. Expo push tokens and raw APNs tokens require an additional provider integration.