zlacker

[parent] [thread] 2 comments
1. slmjkd+(OP)[view] [source] 2020-11-29 05:52:26
How is server-side rendering messy? It's just putting html strings together based on data, no frameworks or libraries needed.
replies(1): >>enw+43
2. enw+43[view] [source] 2020-11-29 06:50:36
>>slmjkd+(OP)
That's what I mean. It feels much messier than JSX, where "putting strings together" is a clean first-class citizen.

With SSR, you need some component that's aware of every change, and that triggers those re-renders at sensible times (every render takes server resources). This all feels messy, compared to rendering just-in-time on the client-side.

replies(1): >>slmjkd+Dr
◧◩
3. slmjkd+Dr[view] [source] [discussion] 2020-11-29 13:12:02
>>enw+43
I wonder what use case you're talking about, I don't have a lot of cases where re-render needs to be dealt with, unless I'm making a web app like a multi player photoshop in the browser, in those cases I won't use SSR. For most information based sites, e.g. Hacker News, Twitter, there's no need to track change and re-render, all the data can be ready on the server side like querying database or making request to third party APIs, then it'll just be piecing HTML strings.
[go to top]