React hooks

Every React hook in the library, plus the shared lifecycle for app open, interstitial, rewarded, and rewarded interstitial hooks.

Use a hook when a component should load and show one ad, and read its load state. The table is the full set. The sections after it are the shared lifecycle for the fullscreen hooks.

All hooks

HookPurposeGuide
useAppOpenAdLoad and show one app open ad.Below
useAppOpenAdManagerGoogle's app open manager: preload, four-hour freshness, cold-start and warm foreground.App open ads
useInterstitialAdLoad and show one interstitial.Below
useRewardedAdLoad and show one rewarded ad and read its reward.Below
useRewardedInterstitialAdLoad and show one rewarded interstitial and read its reward.Below
useGAMInterstitialAdLoad and show one Google Ad Manager interstitial, with app events.Google Ad Manager
useNativeAdLoad and own one native ad for NativeAdView.Native ads
useMultiFormatAdOne request that returns a native or Google Ad Manager banner winner.Multi-format recipe
AdPoolProviderComponent that creates and destroys preload pools; gate with enabled.Preload pools
useAdPoolRead one pool's creation status and availability.Display pool recipe
usePooledAdPoll a pool at show time and own the returned ad.Fullscreen pool recipe
useForegroundRun a callback when the app returns from the background (not on cold start).API reference

On Android, useForeground also fires when a fullscreen ad closes, so if your callback shows a fullscreen ad, guard against showing two back-to-back.

The rest of this page covers the four fullscreen hooks for app open, interstitial, rewarded, and rewarded interstitial ads. Their v17 options form loads automatically by default and exposes one shared lifecycle model. useGAMInterstitialAd uses the same model.

Choose the hook

Each hook takes the same options shape. Use TestIds during development and your own ad unit ID in production.

App open

tsx
import { Button } from 'react-native';
import { TestIds, useAppOpenAd } from 'react-native-google-mobile-ads';

export default function AppOpenButton() {
  const { status, show } = useAppOpenAd({
    adUnitId: TestIds.APP_OPEN,
  });

  return <Button title="Show app open ad" disabled={status !== 'loaded'} onPress={() => show()} />;
}

Use app open ads only while a launch or foreground loading screen is visible. For complete cold- and warm-start handling, see App open ads.

Interstitial

tsx
import { Button } from 'react-native';
import { TestIds, useInterstitialAd } from 'react-native-google-mobile-ads';

export default function InterstitialButton() {
  const { status, show } = useInterstitialAd({
    adUnitId: TestIds.INTERSTITIAL,
  });

  return <Button title="Show interstitial" disabled={status !== 'loaded'} onPress={() => show()} />;
}

Rewarded

tsx
import { useEffect } from 'react';
import { Button } from 'react-native';
import { TestIds, useRewardedAd } from 'react-native-google-mobile-ads';

export default function RewardedButton() {
  const { status, show, reward, earnedReward } = useRewardedAd({
    adUnitId: TestIds.REWARDED,
    requestOptions: {
      serverSideVerificationOptions: {
        userId: 'current-user-id',
        customData: 'reward-source=store',
      },
    },
  });

  useEffect(() => {
    if (earnedReward && reward) {
      console.log(`Grant ${reward.amount} ${reward.type}`);
    }
  }, [earnedReward, reward]);

  return <Button title="Show rewarded ad" disabled={status !== 'loaded'} onPress={() => show()} />;
}

In a real app, react to earnedReward in an effect or state transition after the SDK reports it; do not grant a reward merely because the ad opened. Configure and verify server-side verification for valuable rewards.

Rewarded interstitial

tsx
import { useEffect, useRef, useState } from 'react';
import { Button, Text, View } from 'react-native';
import { TestIds, useRewardedInterstitialAd } from 'react-native-google-mobile-ads';

export default function RewardedInterstitialIntro({
  onContinue,
}: {
  onContinue: (earnedReward: boolean) => void;
}) {
  const [introVisible, setIntroVisible] = useState(false);
  const { status, show, earnedReward } = useRewardedInterstitialAd({
    adUnitId: TestIds.REWARDED_INTERSTITIAL,
  });

  // Move on once when the ad is dismissed, passing whether the reward was earned.
  const latest = useRef({ onContinue, earnedReward });
  latest.current = { onContinue, earnedReward };
  useEffect(() => {
    if (status === 'closed') {
      latest.current.onContinue(latest.current.earnedReward);
    }
  }, [status]);

  if (introVisible) {
    return (
      <View>
        <Text>Watch a short ad to earn 50 coins?</Text>
        <Button
          title="Watch ad"
          onPress={() => {
            setIntroVisible(false);
            show();
          }}
        />
        <Button
          title="Skip"
          onPress={() => {
            setIntroVisible(false);
            onContinue(false);
          }}
        />
      </View>
    );
  }

  return (
    <Button
      title="Continue"
      onPress={() => (status === 'loaded' ? setIntroVisible(true) : onContinue(false))}
    />
  );
}

Google requires an intro screen with clear reward messaging and an option to skip before a rewarded interstitial starts; see Rewarded interstitial ads.

The hook's show swallows a rejected show, so status stays 'loaded' and the next Continue press returns to the intro; Skip is the way on in that case. The sample also assumes the reward event arrives before the ad closes. For valuable rewards, rely on server-side verification rather than the client-side order.

The rewarded interstitial hook works on Android and iOS. Pool-based warming for this format is unavailable on both Android backends (classic and Next-Gen); that pool limitation does not apply to this load-on-demand hook.

The optional requestOptions field is sent while loading an advert and supports values such as keywords, content URLs, and serverSideVerificationOptions for rewarded formats. See content URL targeting and the RequestOptions source for the full set. Setting additional request options helps AdMob choose better tailored ads from the network.

Wait for consent with autoLoad

tsx
import { useEffect, useState } from 'react';
import { Button } from 'react-native';
import mobileAds, { TestIds, useInterstitialAd } from 'react-native-google-mobile-ads';

export default function ConsentAwareInterstitial({ canRequestAds }: { canRequestAds: boolean }) {
  const [adsReady, setAdsReady] = useState(false);

  useEffect(() => {
    let cancelled = false;

    if (!canRequestAds) {
      setAdsReady(false);
      return () => {
        cancelled = true;
      };
    }

    const initializeAds = async () => {
      await mobileAds().initialize();
      if (!cancelled) {
        setAdsReady(true);
      }
    };

    initializeAds().catch(error => {
      console.error('Google Mobile Ads initialization failed', error);
    });

    return () => {
      cancelled = true;
    };
  }, [canRequestAds]);

  const { status, show } = useInterstitialAd({
    adUnitId: TestIds.INTERSTITIAL,
    autoLoad: adsReady,
  });

  return <Button title="Continue" disabled={status !== 'loaded'} onPress={() => show()} />;
}

Here canRequestAds must come from the completed consent flow. adsReady becomes true only after consent permits requests and mobileAds().initialize() resolves, so the hook cannot load earlier. Changing autoLoad to false does not cancel a request already in flight.

Show the ad

The hook returns several states and functions to control ad.

The fullscreen hooks' show is press-safe: it absorbs both the synchronous throw (destroyed ad, or invalid options on a loaded ad) and the promise rejection (not loaded, already showing, platform decline), so onPress={() => show()} needs no .catch or try. A press while the ad isn't showable is a silent no-op and changes no hook state; a platform show failure reported by the ad's ERROR event surfaces as status: 'error' with error set. This does not apply to the ad returned by usePooledAd: its show() is not press-safe and uses the imperative two-channel contract (.catch() the promise; a destroyed ad throws synchronously). See preload pools.

jsx
import { useEffect } from 'react';
import { Button, View } from 'react-native';
import { useInterstitialAd, TestIds } from 'react-native-google-mobile-ads';

export default function App({ navigation }) {
  const { status, show } = useInterstitialAd({
    adUnitId: TestIds.INTERSTITIAL,
  });

  useEffect(() => {
    if (status === 'closed') {
      // Action after the ad is closed
      navigation.navigate('NextScreen');
    }
  }, [status, navigation]);

  return (
    <View>
      <Button
        title="Navigate to next screen"
        onPress={() => {
          if (status === 'loaded') {
            show();
          } else {
            // No advert ready to show yet
            navigation.navigate('NextScreen');
          }
        }}
      />
    </View>
  );
}

The options form automatically starts loading the advert. When the user presses the button, the code checks for status === 'loaded', then calls show() to present the advert. Otherwise, if the ad is not loaded, the navigation.navigate method is called to navigate to the next screen without showing the ad. After the ad is closed, status becomes 'closed' and the app navigates to the next screen.

Call retry() after an error or no-fill, or call load() explicitly when autoLoad is false.

All four hooks use the same status values:

StatusMeaning
idleNo load has started, or the options-form ad was destroyed.
loadingA load is in flight.
loadedThe ad is ready to show.
showingThe fullscreen ad is visible.
closedThe user dismissed a shown ad.
no-fillLoading completed without inventory; retry later, without a tight loop.
errorLoading or showing failed; inspect the structured error fields below.

error.phase identifies the load or show stage. error.reason is the machine-readable classification to use for branching. error.message is human-readable diagnostic text and is not stable for branching.

Return values of the hook are:

NameTypeDescription
statusUseFullScreenAdStatusCurrent lifecycle state: idle, loading, loaded, showing, closed, no-fill (load-phase), or error.
autoLoadbooleanResolved automatic-load policy.
clickedbooleanWhether the user clicked this ad.
impressionbooleanWhether this ad recorded an impression.
errorAdError | nullNon-null when status is no-fill or error.
responseInfoResponseInfo | nullResponse metadata for the current load outcome.
revenuePaidEvent | nullSee [Impression-level ad revenue].
rewardRewardedAdReward | nullReward item; rewarded hooks only.
earnedRewardbooleanWhether the user earned the reward; rewarded hooks only.
loadFunctionExplicitly load using the current request options.
retryFunctionRetry after no-fill or error.
showFunctionShow the loaded advert.
destroyFunctionDestroy the current ad instance.

Fullscreen 'no-fill' is load-phase inventory emptiness (no-fill or mediation-no-fill); show-phase failures stay 'error'. See the generated AdError reference.

In the options form, destroy() creates a fresh idle ad with the current arguments but does not load it, even when autoLoad is true; later load() or retry() uses that replacement. The positional and imperative-ad forms only destroy the current instance.

responseInfo and revenue together cover load-time auction metadata and paid telemetry. See Revenue telemetry and auction diagnostics.

To warm fullscreen inventory and poll at show time (instead of a one-shot hook), see Preload pools and multi-format recipes.

Upgrading from v16? See Migrating to v17 for structured errors, destroy() ownership, and the positional-hook deprecation.