# htmx overview
# official links
# articles
HTMX, pour un développement web simplifié - www.sfeir.dev
- 20230726
A First Look at HTMX and How it Compares to React - www.builder.io
- 20230915
# tools
gist htmx + mock requests = SPA?
mock-requests
pkg
<!DOCTYPE html>
<html>
<head>
<title>Hello Page</title>
<script src="https://unpkg.com/htmx.org@1.9.2"></script>
<script src="https://unpkg.com/mock-requests@1.3.2/index.js"></script>
<script language="javascript">
MockRequests.setDynamicMockUrlResponse('/ui/button',
{
dynamicResponseModFn:
function (request, response, parameters) {
console.log("A mock request was made: ", request, response, parameters)
return "hello"; // hardcoded here but full request is available for dynamically generating
},
usePathnameForAllQueries: true
});
</script>
</head>
<body>
<h1>Hello</h1>
<button hx-get="/ui/button" hx-swap="afterend">Load</button>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26