Hacker News new | ask | show | jobs
by mythrwy 3088 days ago
jQuery doesn't have to be spaghetti though. It gets that rap I think because most people that used it weren't good/experienced enough to organize bigger code. It can/usually does turn into a mess though but is faster to bang small things out in for me anyway.
1 comments

It doesn’t have to be spaghetti. You are right. However, when you change state in multiple places, they either have to be aware of each other or you need some kind of state management. The benefit of libraries like React are that they abstract view rendering and take care of DOM diffing. The benefit of frameworks like Angular is that it manages state in addition to what React does.

On simpler projects, JQuery is more productive. But my main point is to program where it is comfortable and practical. The better academic choice is not necessarily the better choice. View your programming resources as people and make the pragmatic choice.