In the case of HN ui, no response from the server is strictly necessary on submit, and thus no reload is needed. Hence mentioning <input type="submit"> rather than <form>. You can indicate that the vote was made by using a checkbox and styling appropriately. A submitted comment can be similarly controlled with CSS.
For non-HN cases, you can do long-polling, where the original response from the server is never closed, and thus you can always append new HTML to the end, hiding outdated elements as necessary with CSS.
Example:
<iframe name="do_nothing" style="display:none;"></iframe>
<form action="vote" target="do_nothing">
<input type="submit" name="my_vote" value="up">
<input type="submit" name="my_vote" value="down">
<input type="hidden" name="comment_id" value="234">
</form>What parts of the page do you reload with HTMX when user's state changes? A GET request to retrieve updated page header? Another request to retrieve updated page footer? Another request to reload the dropdown menu below a post? All of which could be rerefencing user's state.
And then do you implement endpoints for literally every partial and propagate state to all these endpoints?
> Front end is not just a presentational layer
I agree that front is not a presentational layer in all projects, but I also think that most web projects out there are CRUD-like, and for a lot of those, front can be just a presentational layer. I'm just saying that the effort of making front more than that and going the Single Page App route needs to be justified by some business reason - even something vague like "we want to leave the door open releasing a mobile app later so we need an API anyway".