4 ms·
https://docs.mux.com/ https://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 le
by swyx 3y ago
https://docs.mux.com/ https://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.
- CipherThrowaway 3y agoIt seems most of the content is dynamically rendered (at build time with SSG). What alternative did you have in mind?
- psd1 3y agoI'd rather use Blazor, or Jinja. But I hate react, js, and front end work, so maybe I'm not the target audience. I clicked the link out of morbid horror.
- CipherThrowaway 3y agoI haven't used Blazor, but I shudder at the thought of using Jinja to generate the HTML here. Rendering documents from OpenAPI spec benefits from being able to easily transform data, map, filter and so on - especially if you are displaying the JSON schema for request and response bodies (which docs.mux.com appears to be doing). The experience of doing these transformations in template languages is pretty sub par.
- sodapopcan 3y agoI use Phoenix LiveView and I’m really big on frontend. I also do a lot of backend, though, so I’m one of those “full stack” generalists that no one likes anymore.
- quickthrower2 3y agohttp://motherfuckingwebsite.com/ http://motherfuckingwebsite.com/ styling is sufficient for technical docs. I hate the scroll hijacking and other shenanigans on modern docs sites.
- CipherThrowaway 3y agoI agree re: scroll hijacking and with a preference for minimal styling, while noting that the styling on docs.mux.com is pretty minimal compared to other docs sites. What I'm wondering is what the anti-React folks are recommending for generating HTML and/or DOM itself in the docs use case, since most of it needs to be dynamically generated from OpenAPI definitions.
- Osiris 3y agoStatic file generation. People are suggesting that tooling creates HTML files from templates at compile time and then served as plain HTML.
- CipherThrowaway 3y agoGoing by the response headers, it seems that most if not all of the HTML served by docs.mux.com consists of cacheable static files. As the OP article mentions, using React for static generation is one of the big use cases for RSC and Next. Which templating technology would you recommend for the use case instead? Keep in mind that generating HTML from OpenAPI specs can become complex and will require plenty of maps, filters, recursion and indexing into the data in the course of transforming it into HTML.
- jmull 3y ago> plenty of maps, filters, recursion and indexing into the data Are there a lot of server side template languages that can’t do this? This is straight-forward stuff.
- CipherThrowaway 3y ago> Are there a lot of server side template languages that can’t do this? Did I say there weren't a lot of template languages that can do this? A dead give-away that this subject isn't as "straight-forward" as you think is that, at one sentence in, you've already misidentified the conversation taking place. This isn't about can vs can't, but about the right tool for the job. What template language would you personally recommend for this project?
- deleted 3y ago[deleted]
- tqkxzugoaupvwqr 3y agoYet 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 link. Do that a few times, you’ll notice it’s incredibly slow to react. Same with resizing the viewport, very sluggish.
- treis 3y agoWow you weren't kidding. Very slow and very frustrating to use.
- FridgeSeal 3y agoGood lord it’s awful haha. 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.
- phist_mcgee 3y agoThere's something to be said for optimistic routing, server or client side. It seems like they're using suspense to wait for the page to be rendered before swapping the route. It's a noticeable breach of the standard pattern of instant navigation, and then wait for content to appear.
- FridgeSeal 3y agoI really wish it was possible for users browsers to opt-out of stuff like this. I don’t want some unhinged developer deciding they’d like to arbitrarily delay things like this, just render the page and stop making things worse.