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

@ezoic/react-native-sdk

v1.10.0

Published

Ezoic Ads SDK for React Native (Prebid + Google Ad Manager banner, native, interstitial, rewarded, outstream and instream video ads).

Readme

@ezoic/react-native-sdk

Ezoic Ads SDK for React Native (Prebid + Google Ad Manager banner, native, interstitial, rewarded, outstream and instream video ads).

A thin React Native (New Architecture) wrapper over the native Ezoic Ads SDKs for iOS (EzoicAdsSDK, via CocoaPods) and Android (com.ezoic.sdk:ezoic-ads-sdk, via Maven Central). It exposes an imperative EzoicAds TurboModule plus EzoicBannerView, EzoicNativeAdView and EzoicOutstreamAdView Fabric components, and the EzoicInstreamAd controller.

Requirements

  • React Native 0.76+ with the New Architecture enabled.
  • iOS 14.0+, Android minSdk 24+.

Installation

npm install @ezoic/react-native-sdk

iOS

The native EzoicAdsSDK ships as a binary Swift framework that depends on PrebidMobile (a Swift source pod). Consuming a binary Swift framework with Swift dependencies requires framework-based linkage, so your app's Podfile must enable static frameworks:

use_frameworks! :linkage => :static

Then install pods:

cd ios && RCT_NEW_ARCH_ENABLED=1 pod install

Usage

import { EzoicAds, EzoicBannerView } from '@ezoic/react-native-sdk';

// Initialize once, early in app startup.
await EzoicAds.initialize({ domain: 'example.com' });

// Optional consent / privacy signals.
EzoicAds.setGDPRConsent(true, '<IAB TCF consent string>');
EzoicAds.setGPPConsent('<GPP string>', '7');
EzoicAds.setSubjectToCOPPA(false);

// Track a pageview.
const tracked = await EzoicAds.trackPageview();

// Render a banner. A hard-coded height is optional: on no-fill the view
// collapses to height 0 (default), and `onSizeChange` reports the creative
// size (or `{ width: 0, height: 0 }` when collapsed).
<EzoicBannerView
  adUnitIdentifier="123456"
  size="300x250"
  style={{ width: 300 }}
  collapseOnNoFill
  onSizeChange={({ width, height }) => console.log('size', width, height)}
  onLoad={() => console.log('loaded')}
  onError={(e) => console.log('error', e.message, e.code)}
  onImpression={() => console.log('impression')}
  onClick={() => console.log('click')}
  onOpen={() => console.log('open')}
  onClose={() => console.log('close')}
/>;

adUnitIdentifier is a string coerced to a native integer. size is a "WxH" string or comma-separated list (e.g. "300x250", "300x250,320x50"). collapseOnNoFill (default true) collapses the view to height 0 when a load fails and nothing is displayed. onSizeChange receives { width, height } in dp/pt after a fill, or { width: 0, height: 0 } on collapse.

Native ads

EzoicNativeAdView loads a native ad and renders it in an SDK-built template NativeAdView (headline, icon, media, body and a call-to-action). Unlike the banner it has no size prop — size it with style and the template lays its assets out inside those bounds.

import { EzoicAds, EzoicNativeAdView } from '@ezoic/react-native-sdk';

<EzoicNativeAdView
  adUnitIdentifier="123456"
  style={{ width: '100%', height: 300 }}
  onLoad={() => console.log('loaded')}
  onError={(e) => console.log('error', e.message, e.code)}
  onImpression={() => console.log('impression')}
  onClick={() => console.log('click')}
  onOpen={() => console.log('open')}
  onClose={() => console.log('close')}
/>;

Outstream video

EzoicOutstreamAdView loads and renders a self-contained outstream video ad. Like the native ad it has no size prop — size it with style and the native view lays the player out inside those bounds. It is view-managed: mounting the component loads the ad, unmounting destroys it. Same collapseOnNoFill (default true) and onSizeChange props as the banner.

import { EzoicAds, EzoicOutstreamAdView } from '@ezoic/react-native-sdk';

<EzoicOutstreamAdView
  adUnitIdentifier="123456"
  style={{ width: '100%', height: 250 }}
  collapseOnNoFill
  onSizeChange={({ width, height }) => console.log('size', width, height)}
  onLoad={() => console.log('loaded')}
  onError={(e) => console.log('error', e.message, e.code)}
  onImpression={() => console.log('impression')}
  onClick={() => console.log('click')}
  onOpen={() => console.log('open')}
  onClose={() => console.log('close')}
/>;

Instream video

EzoicInstreamAd is a view-less controller for instream (pre/mid/post-roll) video. The host owns the video player and the Google IMA SDK — the SDK renders nothing; its sole deliverable is a GAM VAST ad-tag URL string you feed to your own IMA AdsRequest. A controller is multi-use and prefetchable: it is not auto-destroyed, so you load() it repeatedly and destroy() it yourself.

import { EzoicInstreamAd } from '@ezoic/react-native-sdk';

const instream = new EzoicInstreamAd('123456');

// Resolve the VAST ad-tag URL and hand it to your IMA player.
const adTagUrl = await instream.load({ contentUrl: playingVideoUrl });
adsLoader.requestAds({ adTagUrl });

// On an IMA ad error, walk down the floor waterfall to the next tag.
const next = await instream.getNextAdTagUrl(); // null once exhausted
if (next) adsLoader.requestAds({ adTagUrl: next });

// On the IMA STARTED event, fire the Ezoic impression pixel.
await instream.reportImpression({ revenueUsd: 0.012 });

// Release the native controller when done.
await instream.destroy();

load() rejects on no fill, an uninitialized SDK, or an overlapping load already in flight for this id; it is safe to call again after a previous load resolves. contentUrl and revenueUsd are optional.

API

  • EzoicAds.initialize(config)Promise<void>
  • EzoicAds.setGDPRConsent(applies, consentString?)void
  • EzoicAds.setGPPConsent(gppString?, sectionIds?)void
  • EzoicAds.setSubjectToCOPPA(value)void
  • EzoicAds.trackPageview()Promise<boolean>
  • <EzoicBannerView adUnitIdentifier size collapseOnNoFill onSizeChange onLoad onError onImpression onClick onOpen onClose />
  • <EzoicNativeAdView adUnitIdentifier onLoad onError onImpression onClick onOpen onClose />
  • <EzoicOutstreamAdView adUnitIdentifier collapseOnNoFill onSizeChange onLoad onError onImpression onClick onOpen onClose />
  • new EzoicInstreamAd(adUnitIdentifier)
    • .load({ contentUrl? })Promise<string> (GAM VAST ad-tag URL)
    • .getNextAdTagUrl()Promise<string | null>
    • .reportImpression({ revenueUsd? })Promise<void>
    • .destroy()Promise<void>

License

SEE LICENSE IN LICENSE — Copyright (c) 2026 Ezoic Inc. All rights reserved.