3 ms·
Ask HN: Is there a best practices for jQuery in 2020?
I'm writing a basic front-end for a Django app. I just need a liiitttle js to smooth things UX-wise. I don't know any JS frameworks and I'm not vanilla JS savvy.
Having used jQuery in the past, I think it would be fine for my use case. However, I don't want to end up with a mess on the front-end.
How do I write jQuery that doesn't end up that way? Is there a canonical text or set of best practices I can follow?
- smt88 7y agojQuery was a tool to make DOM manipulation more concise and work across browsers. You don’t need it in 2020 at all. Use vanilla JS. You also don’t need a framework yet. Just write code encapsulated by functions until it becomes a pain to maintain, and then look at frameworks.
- dhruvkar 7y agoI see, so vanilla JS will work across browsers, mobile and all? That's a load off, I'll focus on vanilla then.