← Back to context

Comment by hamdingers

20 hours ago

> do LLMs change the calculus for DRY?

Yes it makes it insanely easy to refactor duplicated logic into shared and tested modules. Why would you go the other way?

Components as in React, Vue, etc requires a complete overhaul in frontend rendering, many dependencies, changes in deployment and even have an impact in organizational structure.

If one wants to do server side rendering with HTML templates like the old days there is no real “components” way of doing it (although declarative Shadow DOM is coming along). Partials are not the same thing.

In that scenario some repetition can give you the benefit of keeping a clean stack with no client side rendering.

  • Have you tried Astro? It lets you do exactly that: server-side rendering with HTML templates in component form, with css scoped to the component. No shadow dom needed, no JS frameworks either.

    • Astro is still fundamentally different, it's not server-side rendered in the sense of dynamic pages. I can't, in a language agnostic way, use Astro to receive a request, get data from the database and render an HTML representation of this data. This won't work in a Go, Rust, or whatever server. Astro at a minimum requires its own compiler to build the static assets, a server to serve them, and a custom API to answer the calls so it can build the dynamic part of pages.