|
|
|
|
|
by greggman3
2266 days ago
|
|
It's 10x the code now. 10x = 10x more space for bugs and bad design. Use to be I might setup a handler on an input element to update a value. Now I have to write an action factory to generate an action to get reduced into a function that updates the value. From simple data.prop = elem.value to 4+ functions and a bunch deep deep overhead. Now I'm not saying all that structure doesn't have benefits but it's also a large amount of rope in which to hang yourself. |
|
On the other hand, most of the code has always been DOM manipulation, and having that declarative rather than imperative is a huge win. The alternative used to be using a template engine like handlebars, but that did a complete re-render every time any state changed, so for anything moderately complex that was too slow and you had to fallback to manual DOM manipulation, and manually keeping the DOM in sync with your state. And that was a large amount of rope in which to hang yourself