Apr 9, 2021
Oh, also funny you brought up table sorts, given I wrote a two part article on the topic.
My big deal about the implementation was to put as little as possible "out of the ordinary" into the markup, hooking and processing what exists rather than making pointless "state" copies, or hard-coding each and every blasted column's functionality.
https://levelup.gitconnected.com/javascript-table-sorting-part-1-of-2-start-out-simple-1df3e0be8d4e