Use HTMX
Add HTMX interactivity with the @primate/htmx
module.
npm i @primate/htmx
import config from "primate/config";
import htmx from "@primate/htmx";
export default config({ modules: [htmx()] });
<!-- components/Welcome.htmx -->
<h1>Hello, World!</h1>
<button hx-get="/api/greet" hx-target="#greeting">Greet</button>
<div id="greeting"></div>
// routes/index.ts
import route from "primate/route";
import response from "primate/response";
route.get(() => response.view("Welcome.htmx"));