MDN (beta) is now built with React
beta.developer.mozilla.org
beta.developer.mozilla.org
https://beta.developer.mozilla.org/en-US/docs/Web/API/Docume...
Search is broken: https://beta.developer.mozilla.org/en-US/search?q=DOMContent...
The menu to navigate in the documentation works, and everything seems reachable from there. https://beta.developer.mozilla.org/en-US/docs/Web/Reference
These links work okay on Netsurf.
I'll report the useless progress bar when Javascript is disabled.
Not so bad overall. Quite good, actually.
Furthermore, it's fast and it looks good. What's the problem?
There are a lot of web standards. XHTML and XSLT are web standards. Server-side rendering is web standard. Being able to save a page with search results and view it online used to be standard.
Some standards are better than others. Some are objectively bad and promote hazardous and error-prone practices. ActiveX is a standard, that was meant to turn Web into platform for running Windows applications. It did so by giving web developers access to powerful programming languages and diverse range of APIs (some of those APIs were a bad idea by themselves). All modern Javascript web frameworks are spiritual successors of ActiveX, and I sincerely hope, that they will end up in the same garbage dump of history where it did.
ECMAScript however is open, very well-supported, and actually works. I see little connection between today's JS frameworks and ActiveX controls. That seems like a stretch of definitions.
XMLHttpRequest used to be a popular ActiveX control, that introduced ability to programmatically perform web requests at programmer's discretion. Most modern Javascript frameworks can't be used without such ability.
Besides, today XHR is being replaced with the fetch API.
As for abstracting the relationship between data and presentation, there is definitely a React bandwagon, but that's kind of the second stage after getting past jQuery.
Unfortunately, React typically takes over the whole page, so it's a little less straight forward.
SSR solves waiting for the API but not the CPU problem.
No, it doesn't. You can just write it.
Anyway, the question here is not why they're using React to generate a site, but rather why they're using it to display the site.
As others have mentioned, there are lots of tools to write DRY HTML/CSS, then compile, then deploy as a static site. No one would ever know which tool you used.
The weird thing here is that they're using React in the browser (not as a one-time step) for a completely static site.
For simple pages templates are totally fine and frameworks might be overkill but when the projects starts getting big stringing templates together can be quite painful let alone debugging them.
Just my opinion though but I'd also like to hear the actual reason for the switch.
It appears they are using server-side rendering with React...
- immediate rendering
- multi-color icons without any stacking tricks
- flexible styling
- better aliasing, more consistent rendering
- can be animated
- easily load only assets used on the page vs a sheet of hundreds, most never used
- works well with rendering libraries like React, makes manipulating images very easy
- compresses well with gzip, no need for symbols
It’s becoming standard practice for good reasons.