3 ms·
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 approac
by ng12 10y ago
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.
- z3t4 10y agoI 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.
- davidjnelson 10y agoRight, it's interesting react had a goal of eliminating xss vulnerabilities so common with the innerhtml approach.
- shados 10y ago"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.