React tAds Widget
A React component for displaying ads using tAds.
1. Installation
npm install react-tads-widget
2. Add widget in your react component
import { TadsWidget } from 'react-tads-widget';
<TadsWidget id="unique-widget-id" debug={false} onShowReward={rewardUserByShow} onClickReward={rewardUserByClick} />
3. Config your widget
id | required | string | | Your widget id, which you get from manager of tAds |
debug | optional | boolean | false | flag which you can use for development mode (it doesn't collect data in your ads account and doesn't requests real ads) |
onShowReward | optional | function | null | callback which will be called after user watches ad |
onClickReward | optional | function | null | callback which will be called after user clicks ad |
onAdsNotFound | optional | function | null | callback which will be called if we don't find ads for user |