hx-trigger is used for server side requests. `setInterval` can be used to fire http requests on an interval but it can also be used for a lot more things and you have full control over it. `hx-trigger` involves using proprietary language as strings to program the request. I have no idea by looking at that how it tears down, cancels, or responds to other events or triggers on the page. The reason for JSX is a custom template language ALWAYS ends up reinventing JavaScript in a worse, more limited form as template strings.