
MDN (beta) is now built with React - Louistiti
https://beta.developer.mozilla.org
======
jraph
So. It seems that without Javascript, regular documentation pages work, but
there is a useless position:fixed progress bar at the top.

[https://beta.developer.mozilla.org/en-
US/docs/Web/API/Docume...](https://beta.developer.mozilla.org/en-
US/docs/Web/API/Document/DOMContentLoaded_event)

Search is broken: [https://beta.developer.mozilla.org/en-
US/search?q=DOMContent...](https://beta.developer.mozilla.org/en-
US/search?q=DOMContentLoaded)

The menu to navigate in the documentation works, and everything seems
reachable from there. [https://beta.developer.mozilla.org/en-
US/docs/Web/Reference](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.

------
warpech
I am shocked and feel kind of betrayed that the de facto "Web documentation"
moves away from using Web technology for static documents to something that
treats the Web as a broken runtime for apps.

~~~
SquareWheel
It's a webpage built on web standards and designed for web developers. It
couldn't get any more webby.

Furthermore, it's fast and it looks good. What's the problem?

~~~
altfredd
> It's a webpage built on web standards and designed for web developers.

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.

~~~
SquareWheel
Well, the W3C's standardization attempts of XHTML were a bust. Microsoft's use
of ActiveX was also quite proprietary (only ran on Windows as I recall). At
the very least it wasn't an _open_ standard.

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.

~~~
altfredd
> I see little connection between today's JS frameworks and ActiveX controls.

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.

~~~
SquareWheel
XMLHttpRequest was useful enough to become a standard browser feature. That
doesn't prove that ECMA is somehow nonstandard, or even a poor standard. Or
that frameworks built on top of it are.

Besides, today XHR is being replaced with the fetch API.

------
smt88
This is very weird to me. It seems like a totally static site. What does it
need React to do, exactly?

~~~
jammygit
I can’t imagine a more suitable use case for a static site than for
documentation. Why on earth?

~~~
anchpop
I find react to be a very pleasant way to make websites, even static ones. And
for static sites you can use SSR or something like GatsbyJS to make everything
load as if you had actually written the html (i.e. no dependence on
javascript). That's the approach I use for my blog and according to google
pagespeed the only problem with it is that the TTFB is too high (which is
surprising because I host it as a totally static site on AWS)

~~~
pier25
How is it surprising that rendering a React website is slower than simple
HTML?

~~~
anchpop
The server doesn't do any rendering before serving the page. All the "SSR" is
done exactly once at build time. To the server it's no different from serving
any other site.

~~~
pier25
I'm not too familiar with Gatsby but something has to be slowing you down if
TTFB is too high.

~~~
anchpop
It's not that high, Google says I might be able to save .8 seconds. I might
try hosting on netlify and see if that improves things

------
timw4mail
Because apparently traditional server-side rendering isn't complex enough...

It appears they are using server-side rendering with React...

------
lousken
When did inlining svg icons become a thing? I've always seen things like font
awesome.

~~~
ricardobeat
Inline SVG has several advantages over icon fonts, which were never meant to
exist:

\- 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.

~~~
jraph
\- works for people who block web fonts

------
pier25
Are they using React only for the small interactive parts?

