upvote
You don’t need an SPA for that; Wikipedia has client-side sorted tables for example.
reply
I hate what it does to my back button
reply
HTMX is the solution
reply
So instead of using JS to sort the table directly, now you make a JS fetch() request to sort the table?!

It does make sense in one situation, if the table is a large server-side paginated one and the sorting is really an ORDER BY clause. But for a basic table that fits entirely on the client, it doesn't make sense at all. There are tiny JS libraries that will make <table>s sortable when you add a particular class name.

reply
Trading one javascript for another?
reply