Under the hood of MDN's new frontend
43 points by FedericoSchonborn
43 points by FedericoSchonborn
I'm surprised to learn that at some point, MDN's frontend was based on create-react-app. I've tried ejecting a project made with it in the past and the tangle of unnecessary packages and messy configuration was demoralizing. No wonder they ran into so many problems with the old frontend.
To be honest, I'm surprised that they chose React to begin with for such a predominantly static site.
I didn’t give this a thorough read, but this part caught my attention:
This pattern means users need to download and parse an additional 75K (gzipped) of libraries, and wait for a second request to fetch the data after the page loads, just to render static content that will not change for the lifetime of the page.
That's a quote from the documentation for React Server Components (RSC): so the project recognizes that this is a problem, and is working hard on solving it.
They didn’t include the next sentence in the quote, which shows that the React team is not working hard on this problem, they have already solved it and it’s called React Server Components.
Rendered server components are stripped of their runtime requirements so they are not hydrated traditionally, and don’t need that 75Kb bundle on the client. Also it doesn’t necessarily need a “server” either, it can be rendered on build time.
I’m curious why did they took that quote out of context with the opposite conclusion. Running RSCs during build may or may not solve their problems, but this seems like a huge oversight.