← 返回技术雷达
Hacker News tech

Removing React.js from the codebase and adapting Htmx for UI interactivity (2023)

Hacker News 热议:Removing React.js from the codebase and adapting Htmx for UI interactivity (2023)(198 赞 / 147 评论,来源 misago-project.org)

一句话概要

Started by rafalp on Dec. 12, 2023 in the Roadmap category. 6 replies, last one from July 25, 2024.

原文开头节选

But here’s a thing: there’s a lot of forum software out there that still does the old way of rendering as much as possible on the server and using some JavaScript on client to improve its interactivity here and there. And people are happy with that . And this approach has none of the above issues.

Internet forum software has plenty of interactivity, but this interactivity is isolated to specific places on the page. Moderation actions, watching a thread, writing a reply, seeing last notifications, voting in a poll. All this stuff can be achieved without React.js and was achieved without it for years before we’ve decided that full page reload is something that needs to be avoided.

Now, what’s HTMX? HTMX is a tiny library that lets developers specify parts of HTML as dynamic islands that can be swapped by new server-rendered HTML on interaction. For example, list of actual threads is one such (large) island.

HTMX is declarative way of doing $.get(“url”, “#outlet”) we’ve did in jQuery 20 years ago. Or Rails Turbolinks.

(以上为原文节选,完整内容见下方”原文来源”)

这条动态今日登上 Hacker News 首页(198 赞 / 147 评论,来源 misago-project.org)。技术雷达每日自动聚合 AI 工程、后端架构、DevOps 方向的前沿动态;相关工程落地可浏览下方的相关服务与延伸阅读,或直接与我们团队交流。

原文来源: Hacker News

相关服务