Hacker News new | ask | show | jobs
by algem 952 days ago
How would an "Html Web Component" handle state change? I was a bit lost on the benefits given the example of wrapping an img tag. Sure you could group and reuse common elements but you would still need javascript to do anything interactive. Even in the example given the alt text of the image is typically dynamic now because of localization so even then content is missing with javascript.
1 comments

That’s what JavaScript is supposed to be for: state change. Not rendering the page.