React RevJet Tag
RevJet content Tag for React.
Usage Example
import React from 'react'
import { RevJetTag, TagProperties } from '@revjet/react-revjet-tag'
export interface AppProps {}
export function App(_props: AppProps) {
const tagProperties: TagProperties = {
_tag: 'tagXXXX',
_plc_id: '12345',
_key: 'xxx',
debug: 'emulate',
_opts: {
custom_domain: 'ads.revjet.com',
autohide: false,
responsive: true,
responsive_height: 'dynamic',
delivery_method: 'banner',
_imp_banner_size: '640x480'
},
_custom_parameter: 'Custom Parameter'
}
const onBeforeLoad = useCallback(() => {
console.log('onBeforeLoad', tagProperties)
}, [tagProperties])
const onLoad = useCallback(() => {
console.log('onLoad', tagProperties)
}, [tagProperties])
const onError = useCallback(
(err) => {
console.log('onError', err, tagProperties)
},
[tagProperties]
)
return (
<div>
<RevJetTag
tagProperties={tagProperties}
onBeforeLoad={onBeforeLoad}
onLoad={onLoad}
onError={onError}
/>
</div>
)
}