Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Server side rendering is essentially a hack to work around web crawlers' inability to parse dynamic single page apps... My first issue with this is that it doesn't make sense to me why someone would build a high-exposure public website/landing page as a dynamic single page web app, what you really need is a website

Even when building a website, it is exceedingly convenient to compartmentalize large chunks of code into small, manageable UI components that can then be composed together. You will remember the uniquitous "partials" in server-side templating languages/engines/frameworks, such as rails, blade, or nunjucks. Such partials are good for extracting markup; but they do not solve the problem of co-locating the markup with the styles and interactivity associated with it. You can see an attempt to achieve this vision in such projects as Enhance, or webc, or even Astro, whose focus is on building html-first, server-rendered "websites" out of small UI components. But the syntax that these projects use is non-standard and unique to each of the projects. We are in dire need of a web standard way of doing sane server-side templating, which web components could have helped achieve; and my hope is that they will; only right now they still suck at this.



> Even when building a website, it is exceedingly convenient to compartmentalize large chunks of code into small, manageable UI components that can then be composed together.

React was designed by Facebook, a website that is mostly behind a login wall and not indexed. The complaint that React is bad for SEO is therefore somewhat ahistorical. Of course you can use React as a templating engine with SSR and it works just fine, but the original value proposition of React was interactivity.

It seems that nowadays the majority of people are using React in non-interactive contexts, which can be a bit weird for those of us who adopted it as a replacement for jQuery, rather than as a replacement for template engines.


I did not even mention React in my comment :-) React isn't web components. React didn't even invent the idea of a ui component. I agree that Facebook created React for large interactive web sites; and I know that as a server-side templating engine, React is very slow compared to competition; which is why I desperately want web components to succeed on the server and to stardardize ergonomic component-based templating.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: