Re:The State of JavaScript – Survey results
by ng12 on Monday October 03, 2016 @02:05PM
(#12629813)
I think the problem was the hard-to-maintain lazy way was usually the most obvious. There was so much momentum behind the quick-and-dirty imperative DOM approach that it was hard to do anything else. For example, you could totally use Backbone to construct modular, refactorable views -- but in practice everything would devolve into DOM-munging event-driven spaghetti.
[ Parent
| on HN ]
I think one reason why React is so popular is that it forced you into an object oriented approach whereas before many developers used innerHTML everywhere. It is possible to write object oriented, structured "class" based vanilla JavaScript with imperative DOM manipulations though, witch is more performant then popular frameworks.
Re:The State of JavaScript – Survey results
by shados on Tuesday October 04, 2016 @10:31AM
(#12635789)
"I think one reason why React is so popular is that it forced you into an object oriented approach"
And yet React's claim to fame is that it popularized techniques other than OOP, which was plaguing the JS world up until recently.
Re:The State of JavaScript – Survey results
by davidjnelson on Monday October 03, 2016 @07:37PM
(#12632267)
Right, it's interesting react had a goal of eliminating xss vulnerabilities so common with the innerhtml approach.