ESC
React Native Starter AI logo
Menu
On this page

Components > Rewarded Ad Button

Rewarded ad type is used to give users free app credit per watch or any kind of incentive in your mobile application depending on what users benefit from the most. The difference between rewarded ads and interstitial rewarded is that rewarded ads require opt-in check to be shown to the user whereas rewarded interstitial ads can be shown between different states of the application automatically without getting any user input or permission.

Tips to show

Rewarded ad type is mostly suitable for scenarios like the user needs a free credit to keep using the application and you make him/her watch the rewarded ad and add new credits to his/her account to keep using your product and as a result, you increase the engagement time of the user in your application.

Rewarded Ad Button

Rewarded Ad Button component and useRewarded custom hook comes with React Native Starter AI out of the box. The button component can be used to trigger to show the rewarded ad by user action or you can use the custom useRewarded hook to programmatically trigger showing the ad. As mentioned above, you mostly don't need to programmatically trigger the ad and just use the button component; but just in case we put the custom hook and made it flexible to serve your own needs.


React Native Starter AI's dmeo app showing rewarded test ad

The configuration of Rewarded Ad Button component or useRewarded hook is pretty easy too. You need to insert AdMob Ad Unit IDs of Rewarded Ad to react-native-starter-mobile/constants/ads.ts file like below:


react-native-starter-mobile/constants/ads.ts
1// REWARDED 2export const IOS_REWARDED_ID = "ca-app-pub-<REWARDED_AD_UNIT_ID>"; 3export const ANDROID_REWARDED_ID = "ca-app-pub-<REWARDED_AD_UNIT_ID>";

These rewarded ad unit IDs can be created through the AdMob dashboard like below:


AdMob dashboard ad units listing page
AdMob dashboard create rewarded ad unit page