3 ms·
So you end up with an unmaintainable pile of javascript? Or are advocating reinventing the wheel and writing a bunch of boiler plate javascript to marshal data
by balls187 12y ago
So you end up with an unmaintainable pile of javascript?
Or are advocating reinventing the wheel and writing a bunch of boiler plate javascript to marshal data, update state, etc?
----
One major reason to use a JS framework is to enforce good design and coding practices to allow for more maintainable code.
You can certainly implement these patterns yourself in Javascript, but you are reinventing the wheel, which is an antipattern in pretty much all but the edgiest cases.
- woah 12y agoReact abstracts away the stuff that usually makes JS complicated, like DOM manipulation, or dealing with observables. What you're left with is view components that you can just stick a regular JSON tree into. For instance, updating state is something that you don't really need to do in React. Just update your JSON tree, and your interface will match. And JS is really good at monkeying around with JSON. There is some stuff like routers etc. that you might not want to write yourself. Luckily there is a universe of components you can choose from, instead of one that some guy at google thought was good.