Multiple InterstitialAds in one component?
quan2nd opened this issue · comments
Quan 2nd commented
I have multiple Interstitial IDs, is there a way I can use multiple InterstitialAds in one component?
Thank you.
Jay Kim commented
Hi, sorry for late comment.
You can just use multiple hooks if you are using hook, or make multiple instances if you are using ad instances.
Example:
const { adLoaded: adALoaded } = useInterstitialAd(UNIT_ID_A);
const { adLoaded: adBLoaded } = useInterstitialAd(UNIT_ID_B);
const adA = InterstitialAd.createAd(UNIT_ID_A);
const adB = InterstitialAd.createAd(UNIT_ID_B);
adA.load();
adA.show();
adB.load();
...