In server-side rendering, clients are sent HTML that they can see immediately I noticed this too. You can put a plaintext file on the server and it gets transferred to the browser pretty fast. You can also put another plaintext file ending with .css on the server and it can make things on the first page move and look really nice just because the browser knows what to do with it. It’s a neat trick but still second to…
Things I wish I knew before moving 50K lines of code to React Server Components
81–90 of 540 posts
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#82Earlier quoted context omitted.
I don't understand your concern with it and why this is a problem. I haven't personally noticed the vite/esbuild memory consumption, but I also run build only once at the end before deployment or generating the prod artifacts.
It's a problem because it slows down my machine and each js file which is added makes the ram and cpu problem worse, it just doesn't scale. We're using typescript so building only once a day isn't an option.
I don't know what machine you're using, but filling 2.5GB of RAM was already taking less than 200ms back in 2018.
I don't suspect memory usage is an issue here.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#83Earlier quoted context omitted.
My thinking as well. Reflects poorly on the company. I'm not in the market for whatever they're doing but if I was my impression is they have a bunch of hipsters drinking coffee and reimplementing stuff no one asked for.
“This technology we heavily rely on is completely changing the way it works. Should we update now and get into the ecosystem?” “Nah, this guy on hacker news said we’re dumb hipsters for adopting the new normal for react. We should stay on the old versions.” That’s like saying you don’t trust a company because they updated from PHP 5 to PHP 8.2
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#84Earlier quoted context omitted.
I don't understand your concern with it and why this is a problem. I haven't personally noticed the vite/esbuild memory consumption, but I also run build only once at the end before deployment or generating the prod artifacts.
It's a problem because it slows down my machine and each js file which is added makes the ram and cpu problem worse, it just doesn't scale. We're using typescript so building only once a day isn't an option.
During development vite has HMR and you don't need to run build after every change. This is no different when using SSR.
But I don't want to further argue. If you think that SPA is not suitable for your use case, that's ok.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#85Earlier quoted context omitted.
It's a problem because it slows down my machine and each js file which is added makes the ram and cpu problem worse, it just doesn't scale. We're using typescript so building only once a day isn't an option.
> It's a problem because it slows down my machine I don't know what machine you're using, but filling 2.5GB of RAM was already taking less than 200ms back in 2018. I don't suspect memory usage is an issue here.
And getting more RAM is just delaying the problem anyways since it takes more RAM every week as the product evolves.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#86Re: Things I wish I knew before moving 50K lines of code to React Server Components
#87The Yesod Haskell web framework has had this for I think more than a decade, and I'm sure it isn't the only one. It's not a bad idea, but it's strange to see old ideas presented as novel.
As Sagan said, “If you want to bake a cake from scratch, you must first invent the universe.”
We’re remixing everything all the time, nothing is completely new and that’s fine. We still move forward.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#88Doesn’t make any sense for me why we are now using React in the backend, to render HTML… Let’s go back to 10 years ago.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#89I guess you use what you are familiar with, but using react for doc site instead of using some off the shelf static site generator/cms with caching seems like wasted effort. More fun from dev point of view with react no doubt.
Frontend docs sites almost always include runnable examples, that you can play with inside the docs.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#90In server-side rendering, clients are sent HTML that they can see immediately I noticed this too. You can put a plaintext file on the server and it gets transferred to the browser pretty fast. You can also put another plaintext file ending with .css on the server and it can make things on the first page move and look really nice just because the browser knows what to do with it. It’s a neat trick but still second to…
I thought we had lost that technology.