4 ms·
> pleasant to work with if you're a startup or small shop. if you have to deal with any native code that expects to know something about the dom, now you just
by gcb0 11y ago
> pleasant to work with
if you're a startup or small shop.
if you have to deal with any native code that expects to know something about the dom, now you just forced that code to do expensive and constant polling algos because you completely pulled the dom from under its feet.
- nroman 11y ago> small shop Like Facebook? Netflix? The BBC?
- gcb0 11y agonetflix = have their own renderer. that is lot of hours of good engineers dedicated to that. facebook = probably hack away all the low level stuff they need to tweak. bbc = they probably have the same problem we have here. that does not stop them or we to boast that we use react all over the place. doesn't mean we like it.
- ConAntonakos 11y agoHe forgot to add Airbnb to that list.
- zem 11y agoi'm not a web dev, so i could be missing something obvious, but i can't think of any use cases for inspecting the dom from native code. example?
- mc808 11y agoThe 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.
- stephen_cagle 11y agoReact isn't polling, it is callbacks and recursive functions.