3 ms·
Even so, web developers always had the option of sticking with an imperative approach to UI, like using element.innerHTML = '...', but overwhelmingly they prefe
by ziftface 3y ago
Even so, web developers always had the option of sticking with an imperative approach to UI, like using element.innerHTML = '...', but overwhelmingly they preferred more declarative solutions like React. You could just as easily make the argument that the shortcomings of HTML had nothing to do with its "declarativeness", since that part was retained. I think a more likely explanation is that HTML couldn't be used to express the more complicated SPAs that people wanted to build, and regardless of what you think about those, JS-based solutions had to fill that need.
- bobthepanda 3y agoYeah, HTML is declarative but the issue is that it’s such in an extremely simple way. Loops, conditions, and variables/transclusions are table stakes, and without them pure HTML is just tedious data entry with extra tags.