Show HN: Swap.js – a JavaScript micro-framework (HTML fragments over the wire) Hi HN! I created this lib in the need of a simple and tiny framework to easily do AJAX-style navigation / replacement of fragments in the page, in a web application. For people who don't want to use client-side-rendering and complex frameworks à la React, there are nowadays a few "HTML-over-the-wire" libraries, like HTMX, Unpoly or this super-tiny one Swap.js :) One other key thing is that no external tool is needed: no bundler, no webpack, no TypeScript compiler, no minification needed. Just write HTML, JS (+ your preferred server-side language: PHP, Python, etc.) and it works. The framework makes use of fetch (of course) but also MutationObserver API to be able to launch actions when parts of the DOM change. Let me know what you think! https://ift.tt/FMJYlV1 May 18, 2023 at 11:04PM
Post Top Ad
Your Ad Spot
Friday, May 19, 2023
Home
Hacker News
Show HN: Swap.js – a JavaScript micro-framework (HTML fragments over the wire) https://ift.tt/qYptF89
Show HN: Swap.js – a JavaScript micro-framework (HTML fragments over the wire) https://ift.tt/qYptF89
Tags
Hacker News#
Share This
About latest news
Hacker News
Labels:
Hacker News
Subscribe to:
Post Comments (Atom)
Post Top Ad
Author Details
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.
Post Top Ad

No comments:
Post a Comment