I think i am getting old. These frameworks are so big and complex. For a simple web hello world you need a huge build and compile pipeline. And now its extended with serverside components. I really wonder what the overhead is. How many of layers of frontend and backend framework code is executed to get the hello world example running. I retreat back to my simple 10kb component framework in which i need only f5 to reb…
You literally just run: > npx create-next-app@latest Press Enter a few times for default settings and voila, you have a hello world app up and ready to run.
Things I wish I knew before moving 50K lines of code to React Server Components
211–220 of 540 posts
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#212Earlier quoted context omitted.
For sure. Ever had to debug a bug deep inside of a webpage's code that relied on 5-10 preconditions to get it to appear? Without HMR, you're spending a lot of time F5ing and navigating to reproduce/fix it.
If only there was a way to programmatically reproduce the conditions under which the problem appears and then exercise the behaviour that triggers the bug. Then some code could verify whether the problem still appears. Once the problem is fixed this same “test” dark magic could help ensure the problem does not occur again. Pipe dreams, my friends. Pipe dreams.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#213https://docs.mux.com/ doesnt seem very interactive at all. i guess i'm being that guy but i'm wondering why it had to be in React, much less RSCs.
Yet performance is abysmal. I clicked on “API reference” and nothing happened for a second. Then the submenu opened in the sidebar. Another second later the content view updated. There is no indication of anything loading, there are no network requests to await. Incredibly, it’s dog slow on an M1 Mac. If the viewport is 800 px or narrower, click on the menu icon (horizontal bars, top right), then click on a sidebar l…
Some more unhinged stuff I noticed:
- swiping backwards exists the drop down menu for some inexplicable reason
- clicks on menu bar items take so long I genuinely thought I hadn’t tapped on it correctly.
- taps on the menu bar sometimes just don’t work. Like, at all. Oh scratch that, the menu was there after I swapped tabs to write this sentence.
- massive chunks load in at different times: the signing key page shifts as more content loads in 3.5 seconds later.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#214In 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…
Sure, that's what we'll do! Sounds grand! By the way, we need to add another feature to our page, would you mind looking through that file so there are no class collisions? What do you mean its too long? 50k lines? Pfft.. But at least it 'gets transferred to the browser pretty fast'
Do not awaken the Ancients for only the pure of heart will survive such an encounter.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#215Earlier quoted context omitted.
They simplify the on-boarding of 6 months boot-camped front-end developers. They can start working and delivering right away despite not being able to tell the difference between front/back ends and having no understanding of servers.
Exactly! These frameworks enable people with 6 months of "software developer" education to enter the industry and enshitificate our careers with their minimum wage level understanding of actual software engineering, dragging all of us down to their salary level.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#216Earlier quoted context omitted.
They can't. The ecosystem has too many dependencies that break at this point. Consider that Target.com, Walmart.com, Microsoft Teams, and untold masses of sites are React. The huge component ecosystem. Entire companies built around it. The core concept is broken§, but fixing it means possibly breaking everything else. If you're going to break everything, might as well use something else. All we can do is truck along…
Basically avoiding the mistake Angular made (moving from 1.x to 2+)
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#217I 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.
It is statically generated. The reason to use React is so you have one language across the front-end rather than having some people using React on one site, and then people using Gatsby/Hugo for something else. Next.JS can do the same thing as Gatsby/Hugo but has more features and is in React.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#218Earlier quoted context omitted.
You literally just run: > npx create-next-app@latest Press Enter a few times for default settings and voila, you have a hello world app up and ready to run.
- 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
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#219I think i am getting old. These frameworks are so big and complex. For a simple web hello world you need a huge build and compile pipeline. And now its extended with serverside components. I really wonder what the overhead is. How many of layers of frontend and backend framework code is executed to get the hello world example running. I retreat back to my simple 10kb component framework in which i need only f5 to reb…
Who knows, maybe software development is going to be fun again, even if for a few years before the new batch starts turning it into a mess.
Re: Things I wish I knew before moving 50K lines of code to React Server Components
#220Does 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?