with HTMX?
Or how else would you do server-side rendered HTMX applications that require some dynamic UI elements?
I was recently trying to add an image carousel (first using https://pawelgrzybek.github.io/siema/) but managing the JavaScript proved difficult (event handlers, variable scopes) with server-rendered HTMX templates. WebComponents seem easier in the sense that they encapsulate all JS in the shadow DOM of the component (right?) and in the template you just have this very simple declarative component like:
<body>
<image-carousel class="">
<img src="https://placehold.co/600x400/555/png">
<img src="https://placehold.co/600x400/FFE/png">
<img src="https://placehold.co/600x400/AAA/png">
</image-carousel>
</body>
how does htmx make it more difficult to add that carousel? should be same as vanilla html/js
Обсуждают сегодня