Tangential, but what's the state of web components at the moment? As a backend engineer, they were very appealing early on since I didn't want to deal with adding an entire framework onto a simple project. How'd that work out? It seems like the big frameworks are still kind by a mile and they provide a much easier developer experience still. Am I wrong there?
I don’t think they will go anywhere, too many different concepts and technologies have been packaged without clear goals. Some concepts like shadow DOM are useful in other contexts though, but templating and data binding is botched in my opinion.
Also, as a JS developer, even if you want to auto-update the end year to the current one, why would you do that on the client? To make the layout shift? Or to display (c) 2024-2038 on clients with wrong date settings?
If it's statically generated, add the year at build time.
If it's server-generated and dynamic, don't do it in JS I guess? I mean, why? It has only downsides.
Yeah, I'm very confused by this. Why is the example also showing a hard-coded 2023 in the component usage? Shouldn't the component be responsible for rendering that?
I believe it's because the `${this.textContent} - ${year}` will render it as `2023 - 2024`. The hardcoded 2023 can be whatever you want as to indicate the start of the copyright.