4 ms·
To be fair, the DOM is that abstraction layer already. It just performs horribly.
by untog 11y ago
To be fair, the DOM is that abstraction layer already. It just performs horribly.
- vcarl 11y agoI've been wondering about additional benefits to abstracting away the DOM, about how practical it would be to then have UIs constructed in different environments that runs off the same base logic. I suppose that's the value proposition of React Native; write your javascript logic once and just rewrite the render function for Android, iOS, web, any any future target that implements the API.
- masklinn 11y agoThe value proposition is declarative UI definition, vdom is how that proposition performs acceptably (or more than acceptably as it allows further optimisation due to pervasive use of pure functions) when layered on an imperative underlying structure.
- vcarl 11y agoYeah I don't specifically mean the virtual DOM, I'm thinking more about the fact that your interactivity isn't coupled to the actual markup. If you avoid browser specific functionality, it would be super easy to port to another platform.
- malkia 11y agoI don't think it performs poorly, it's simply missing functionality to stop update right away, but rather sit there wait for a bunch of commands to come in, and then update. It's possibly missing this "mode" because of other factors (what if you never put it back in "updates enabled" mode?)