3 ms·
He/She cannot do that, at least at their employer, because people would throw up at the sight of the code and cry until its rewritten. As an example slip some
by austincheney 7y ago
He/She cannot do that, at least at their employer, because people would throw up at the sight of the code and cry until its rewritten.
As an example slip some DOM methods into your code and watch people go into convulsions like an angry zombie on cocaine.
- ritchiea 7y agoThere are very real reasons not to use DOM methods assuming you're using a front end framework. Not only is the coding style more imperative than say React, but frontend frameworks have been designed to efficiently update the DOM and have diffing algorithms that can check for necessary state changes. Is there really a compelling reason for writing your own DOM manipulation in a sizeable frontend codebase in 2020?
- austincheney 7y ago> Is there really a compelling reason for writing your own DOM manipulation in a sizeable frontend codebase in 2020? It is several orders of magnitude faster. It’s also how I prefer to code because managing state isn’t challenging and I am not hopelessly paralyzed by imperative code.
- pepper_sauce 7y agoMaybe they don't want to force their users to download several MB of framework libraries in order to use their website. DOM manipulation is perfectly fine for interacting with styled documents, the web's forté. If your website amounts to a set of configuration forms and a blog then you probably don't need React.