> ## Documentation Index
> Fetch the complete documentation index at: https://guide.daro.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Rewarded Video Ads

> Implement rewarded video ads in your React Native app.

## Rewarded Video Ad Format

Provides in-app rewards (currency, features, content) in exchange for watching video ads. Videos are non-skippable and typically run 30 seconds.

<img src="https://mintcdn.com/delightroom-5a71a6a8/j3-znW7LKrbpP3mb/sdk-integration/common-img/ad-formats-en/rv-example-image.png?fit=max&auto=format&n=j3-znW7LKrbpP3mb&q=85&s=05e99c43024f69661838e187b20caf06" alt="Rv Example Image Pn" title="Rv Example Image Pn" style={{ width:"40%" }} width="720" height="1560" data-path="sdk-integration/common-img/ad-formats-en/rv-example-image.png" />

### How It Works

<img src="https://mintcdn.com/delightroom-5a71a6a8/j3-znW7LKrbpP3mb/sdk-integration/common-img/ad-formats-en/rv-example-gif.gif?s=d1b005af49b37b3c1306ef47728165bb" alt="Rv Example Gif Gi" title="Rv Example Gif Gi" style={{ width:"38%" }} width="180" height="390" data-path="sdk-integration/common-img/ad-formats-en/rv-example-gif.gif" />

***

## Implementation

Rewarded ads use the Hook API. `useRewardedAd` manages loading state and reward callbacks together inside your component.

<Warning>
  The previous static API (`RewardedAd.loadAd` and friends) is deprecated. Static listeners such as `RewardedAd.addAdLoadedEventListener` do not receive events for ads loaded through the Hook or instance API — when you move ad loading to the new API, move the event listeners with it.
</Warning>

```javascript theme={null}
import { Button } from "react-native";
import { useRewardedAd } from "react-native-daro";

function RewardedAdButton({ adUnitId }) {
  const { isLoaded, isLoading, load, show, isAdReady } = useRewardedAd(
    adUnitId,
    {
      onLoaded: (adInfo) => {
        // Ad loaded
      },
      onLoadFailed: (errorInfo) => {
        // Ad failed to load
      },
      onReceivedReward: (rewardInfo) => {
        // Reward granted
      },
      onHidden: (adInfo) => {
        // Ad dismissed
      },
      onImpressionRecorded: (adInfo) => {
        // Impression recorded
      },
    }
  );

  const handlePress = async () => {
    if (await isAdReady()) {
      show("CUSTOM_DATA");
      return;
    }

    load();
  };

  return (
    <Button
      disabled={isLoading}
      title={isLoaded ? "Show Rewarded" : "Load Rewarded"}
      onPress={handlePress}
    />
  );
}
```

## Rewarded Video Callback Methods

* The code below shows how to tag your internal User ID and pass CustomData to the callback.
  * The User ID string can be up to 8192 characters.

```javascript theme={null}
setUserId("${USER_ID}");

// Pass CustomData to the show function returned by useRewardedAd.
const { isLoaded, show } = useRewardedAd(REWARDED_AD_UNIT_ID);

if (isLoaded) {
  show("CUSTOM_DATA");
}
```
