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

@visionpush/react-native

v1.0.1

Published

VisionPush React Native SDK — push notifications, in-app messages, geofencing & analytics

Readme

@visionpush/react-native

Official React Native SDK for VisionPush — push notifications, in-app messages, geofencing and analytics for iOS & Android.

It wraps the native VisionPush iOS and Android SDKs through a thin React Native bridge and exposes a typed TypeScript API plus ready-made React hooks.


Installation

npm install @visionpush/react-native
# or
yarn add @visionpush/react-native

This package ships native code and uses React Native autolinking — no manual linking is required for the bridge itself. It does, however, depend on the underlying native VisionPush SDKs, which need the two prerequisites below.

iOS

The iOS bridge delegates to the VisionPushSDK CocoaPod. React Native resolves native dependencies through CocoaPods, so VisionPushSDK must be installable as a Pod (published to the CocoaPods trunk). After installing the npm package:

cd ios && pod install

ℹ️ The VisionPush iOS SDK is also distributed via Swift Package Manager, but the React Native iOS toolchain uses CocoaPods — the VisionPushSDK Pod is what matters here. Minimum deployment target: iOS 15.0.

You also need the standard push-notification capability and an UNUserNotificationCenter delegate wired in your AppDelegate (see the native iOS SDK docs).

Android

The Android bridge delegates to the native VisionPush Android SDK. Until it is published to Maven Central, that SDK is resolved from JitPack, so add the JitPack repository to your app's android/settings.gradle:

dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }   // <- required for the VisionPush Android SDK
  }
}

Minimum SDK: API 21. Add your google-services.json for FCM as usual.


Quick start

import { VisionPushClient } from '@visionpush/react-native';

const visionpush = new VisionPushClient({
  appId: 'YOUR_APP_ID',
  apiKey: 'vp_live_xxxxxxxxxxxxxxxx',
  // apiUrl: 'https://api.visionpush.de/v1', // self-hosted / staging override
});

async function setup() {
  await visionpush.initialize();              // registers the device
  const status = await visionpush.requestPermission();
  console.log('permission:', status);

  await visionpush.setExternalId('user-42');
  await visionpush.setTags({ plan: 'pro', locale: 'de' });
  await visionpush.trackEvent('app_open', { source: 'cold_start' });
}

// React to notifications
const off = visionpush.onNotificationOpened((payload) => {
  console.log('opened:', payload);
});
// ...later: off();

React hooks

import {
  useVisionPush,
  useNotificationPermission,
  useNotifications,
  useInbox,
} from '@visionpush/react-native';

function Screen() {
  const client = useVisionPush(visionpush);
  const { status, request } = useNotificationPermission(client);
  const { last } = useNotifications(client);
  const { items, markRead, refresh } = useInbox(client);

  // render…
}

API surface

| Area | Exports | | --- | --- | | Client | VisionPushClient | | Realtime | RealtimeChannel | | Hooks | useVisionPush, useNotificationPermission, useNotifications, useInbox, useRealtime | | Errors | VisionPushError, NotInitializedError, NativeModuleError, PlatformNotSupportedError, … | | Types | VisionPushConfig, NotificationPayload, PermissionStatus, InboxItem, … |

Client methods include initialize, requestPermission, getPermissionStatus, setExternalId, setTags, optIn, optOut, trackEvent, getInbox, getDeviceId, enableRealtime/disableRealtime and the on* event subscriptions.


Development

npm install        # also runs `bob build` via prepare
npm run build      # react-native-builder-bob → lib/{commonjs,module,typescript}
npm run typecheck  # tsc --noEmit
npm test           # vitest

The package is built with react-native-builder-bob and emits CommonJS, ES modules and TypeScript declarations under lib/. The react-native/source fields point at src/ so Metro consumes the TypeScript source directly during development.

License

MIT © VisionLab