TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is there a best practices for jQuery in 2020?

2 点作者 dhruvkar大约 5 年前
I&#x27;m writing a basic front-end for a Django app. I just need a liiitttle js to smooth things UX-wise. I don&#x27;t know any JS frameworks and I&#x27;m not vanilla JS savvy.<p>Having used jQuery in the past, I think it would be fine for my use case. However, I don&#x27;t want to end up with a mess on the front-end.<p>How do I write jQuery that doesn&#x27;t end up that way? Is there a canonical text or set of best practices I can follow?

1 comment

smt88大约 5 年前
jQuery 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.<p>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.
评论 #22539822 未加载