Hacker News new | ask | show | jobs
by camus2 3130 days ago
> Don't. Please. I don't want to maintain your state spaghetti.

I fail to understand how not using jQuery prevents anyone from writing spaghetti code.

I've seen plenty of spaghetti code written with "framework du jour", Angular and React included.

1 comments

> state spaghetti

State is particularly hard to manage using jQuery because, unlike frameworks, it has no builtin way to deal with it.

The disconnect between DOM and JS state is what makes frontend programming a pain to deal with. This led to ad-hoc bug-ridden "state machines" (i.e. spaghetti global variables all over the place) that broke at the very first unexpected interaction.

If you're using a proper state machine (or your program is simple enough to not need them) you're better off just using the regular browser API.

jQuery brings nothing to the table in 2017. I'm willing to be proved wrong. Is there anything that jQuery vastly simplifies?