Earlier quoted context omitted.
The argument is usually that you don't want a network round trip for interactivity. That's less true than it's usually presented, I think because most folks making that argument think the server is necessarily slow.
But... a round trip is usually faster than serving 2MB of JavaScript.
Things I wish I knew before moving 50K lines of code to React Server Components
451–460 of 540 posts
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#452Does anyone know if CSS-in-JS and Context support is planned for RSC, or is there a technical limitation which means they’ll never be possible?
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#453Does anyone know if CSS-in-JS and Context support is planned for RSC, or is there a technical limitation which means they’ll never be possible?
For Context support, I think the reason it's not supported is because Server and Client components have different lifetime. In theory they could add something like Server Context, that's accessible only to Server components. For CSS-in-JS, those are all 3rd party libraries, so they need to adapt on their side. For example, `styled-components` uses Context heavily, so they need to re-think their approach. For `css-mod…
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#454Earlier quoted context omitted.
> For a simple web hello world you need a huge build and compile pipeline. These frameworks were not created to solve “Simple hello world” apps.
Well they don't look like they were created to manage complexity either, so exactly why are they used?
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#455Earlier quoted context omitted.
- npx create-next-app@latest - npx: command not found - install node / npx - npx create-next-app@latest - realise your node is too old - install nvm / node - npx create-next-app@latest - answer a bunch of questions - npm start - get an error: Error: ENOENT: no such file or directory, open '/tmp/my-app/.next/BUILD_ID' - npm run dev - hello world in browser
If you don't have the toolchain set up, it's not like it's different for any other language.
- browse to file:///tmp/index.html
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#456Earlier quoted context omitted.
My brother just started learning web development this past year and his mind was blown when I told him you could send HTml over HTtp.
Reminds me of the joke about, "Omg, that's amazing, the new iPhone will support voicechat ... and you can use your phone number as your screenname!"
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#457Earlier quoted context omitted.
Just because it’s a one liner to install something doesn’t mean you aren’t installing a big, complex, over-engineered thing.
I find it curious that we always see these opinions expressed about front end frameworks, but no one seems to have much problem with all of the complexity in back end frameworks like node, Python, Java, .Net... I have a sneaking suspicion that people are just more used to having complexity hidden from them behind a framework install, whereas front end puts everything front and center since it's all delivered to your…
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#458Doesn’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
#459Earlier quoted context omitted.
If you don't have the toolchain set up, it's not like it's different for any other language.
- echo "hello world" > /tmp/index.html - browse to file:///tmp/index.html
browse - no browser installed
edit - no editor found
See, I can do the same thing. In any case you need a toolchain installed to actually program in the language you want to program, even if that toolchain is minimal. Complaining about a toolchain not being installed for the thing you want to do is not very useful.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#460Earlier quoted context omitted.
- echo "hello world" > /tmp/index.html - browse to file:///tmp/index.html
echo - command not found (maybe you're on Windows) browse - no browser installed edit - no editor found See, I can do the same thing. In any case you need a toolchain installed to actually program in the language you want to program, even if that toolchain is minimal. Complaining about a toolchain not being installed for the thing you want to do is not very useful.