react-native-google-mobile-ads
    Preparing search index...

    Function useRewardedAd

    • React Hook for Rewarded Ad.

      Parameters

      • adUnitId: string | null

        The Ad Unit ID for the Rewarded Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.

      • OptionalrequestOptions: RequestOptions

        Optional RequestOptions used to load the ad.

      Returns AdHookReturns

      Pass an options object instead: useRewardedAd({ adUnitId }). The positional form is removed in v18. The options form loads on its own, accepts autoLoad, and reports a single status. See the v17 migration guide.

    • React Hook for Rewarded Ad.

      Loads as soon as it can, unless autoLoad is false.

      reward is populated twice: at load with the item the ad advertises, and again when the user earns it. earnedReward is what tells those apart.

      const { status, show, reward, earnedReward } = useRewardedAd({
      adUnitId: TestIds.REWARDED,
      });

      // Before showing: reward describes what is on offer.
      // After earning: earnedReward is true and the grant is safe to apply.

      Parameters

      Returns UseFullScreenAdResult