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

croissantlabs-react-native

v0.1.0

Published

CroissantLabs SDK for React Native — in-app subscriptions, offerings, entitlements

Downloads

91

Readme

CroissantLabs SDK (React Native)

React Native SDK for CroissantLabs: in-app subscriptions, offerings, entitlements, and restore.
Full native IAP: opens App Store / Play Store, syncs receipts with CroissantLabs, and restores purchases.
V1 targets React Native and is Expo-compatible.


Installation

Install the SDK and the native IAP peer dependency:

npm

npm install croissantlabs-react-native react-native-iap

Yarn / pnpm

yarn add croissantlabs-react-native react-native-iap
pnpm add croissantlabs-react-native react-native-iap

Expo

If you use Expo, prefer the Expo-compatible install so peer dependencies match your Expo SDK:

npx expo install croissantlabs-react-native react-native-iap

Prerequisites

  • React Native 0.64+ (or Expo SDK 48+)
  • react-native-iap ^12.x or ^13.x (peer dependency; required for purchases)
  • A CroissantLabs project and API key from the CroissantLabs dashboard (or self-hosted platform)
  • iOS: deployment target 13.4+
  • Android: minSdkVersion 23+

Quick start

import CroissantLabs from 'croissantlabs-react-native';

// 1. Configure (e.g. in App.tsx or root component)
useEffect(() => {
  CroissantLabs.configure({ apiKey: 'YOUR_PUBLIC_API_KEY' });
}, []);

// 2. Optional: identify your user
CroissantLabs.identify('user_123');

// 3. Get offerings and show paywall
const offerings = await CroissantLabs.getOfferings();
const package = offerings.current?.availablePackages[0];
if (package) {
  const { customerInfo } = await CroissantLabs.purchasePackage(package);
  // Check customerInfo.entitlements.active['premium']
}

// 4. Check entitlements
const customerInfo = await CroissantLabs.getCustomerInfo();
const hasPremium = customerInfo.entitlements.active['premium'] != null;

// 5. Restore purchases
const restored = await CroissantLabs.restorePurchases();

API overview

| Method | Description | |--------|-------------| | configure(options) | Initialize with API key and optional base URL. | | identify(userId) | Set app user id for this device/session. | | getOfferings() | Fetch current offerings and packages. | | purchasePackage(package) | Open native store, purchase, sync receipt with CroissantLabs. | | getCustomerInfo() | Get current entitlements and subscription status. | | restorePurchases() | Restore from store and sync with CroissantLabs. |


Documentation


License

See repository license. CroissantLabs SDK is open source.