HTML Web Components Re-Use Logic, Which is What You Want
September 30, 2024
Custom elements that wrap HTML (AKA “HTML Web Components”) can be extremely useful for re-using logic without requiring the user of the custom element to adopt any particular UI or styling. And this is usually the sort of re-use you actually want.
Let me demonstrate by creating a way to sort and filter any HTML table. Sorry, this is a bit long.