4 ms·
The comment makes some sense if you replace "native" with "plain" or "vanilla" JavaScript.
by mc808 11y ago
The comment makes some sense if you replace "native" with "plain" or "vanilla" JavaScript.
- gcb0 11y agoyep. like 99.9% of the code ad networks expect. they want to check DOM state to make sure you are not a sleazy publisher hiding the ads under the content or if you are not being shown in an iframe on some porn site. with react, they will get inconclusive results because their code might run while they are virtualized or god forbid during the render. and you will only get garbage ads because now they consider you a garbage publisher.
- tracker1 11y agoWrite your wrapper for ads as a component that renders a div... bind your ad-logic as part of the componentDidMount() event handler. The results should be consistent.
- zem 11y agooh! yeah, that does make more sense; i was thinking of something like a qt webview.