Hacker News new | ask | show | jobs
by HumblyTossed 2289 days ago
> The need to evolve our platform is very evident when it comes to how we design, develop, and deliver experiences to users in the browser.

> Requirements:

> The framework allows UI elements to be defined in a declarative way

> UI elements created within the framework are reactive (update automatically in response to changes in data or user input) by default

> The framework is open-source, widely used, and has a thriving community (and we anticipate this will continue to be the case for years to come)

> Flexibility: the framework supports the widest-possible range of use-cases (client-side as well as server-side rendering, progressive enhancement as well as full "SPA" usage, build step as well as no build-step etc.)

> The framework is heavily optimized for performance.

Only ONE of those has anything at all to do with the user.

2 comments

To be blunt, this is an extremely common thing in web development and it makes me very sad. But whenever I raise it I’m rebuffed with the vague argument that “developer productivity = more features = better user experience”. Which sounds great in theory but a crappy experience is a crappy experience no matter how many features you put on top.

Go look at the lighthouse scores for pages that use React + Redux + whatever + blah blah and tell me the user experience isn’t sub par. Especially for an organisation like MediaWiki page load time is absolutely critical. I really hope they are sensible enough to choose something lightweight.

> Go look at the lighthouse scores for pages that use React + Redux + whatever + blah blah and tell me the user experience isn’t sub par

I looked at the Lighthouse score for my blog (written in React and all that blah blah). It got a 100 for performance, 100 for accessibility, 100 for best practices, and 100 for SEO. So I am happy to tell you the user experience is not sub par.

Serious question: why are you using React for a blog? What interactive elements are there on the page that require it?

EDIT: Saw the link in your profile. I see lower numbers than you, though not by much. But I also see 2.6 seconds time to interactive with 3.1 seconds of main thread work.

Broadly speaking, that's fine for your blog. But if it was a site that you expect to add more and more features to over time that number is only going to go up. 3.1 seconds of main thread work to render an entirely static page isn't good. It's acceptable at best.

There are no interactive elements, I just enjoy using React more than the alternatives, even for static content. Instead of asking "what requires react", a better question is "what are the tradeoffs of using react in this situation". In my case React allows me to use Gatsby, a wonderful static site generator, and it also makes it easy for me to add any interactive content I want in the future.

My site will load fine without javascript, so it's hard to imagine react is slowing things down much (although if you've visited before the PWA will mess it up if you try to turn JS off).

For something like Wikipedia, time to interactive isn't that important (which is good, because lighthouse tells me that this page [1] has a TTI of 7.4s). First meaningful paint matters much more. I really disagree with the narrative that anything written with React is going to have a much worse user experience compared to the "old" stack.

[1]: https://en.wikipedia.org/wiki/Matthias_Hansen_House

I’d say your use case isn’t really all that applicable to how React is normally used. Zero interactive elements and doesn’t require JS... that really isn’t typical for a React deployment.

> I really disagree with the narrative that anything written with React is going to have a much worse user experience compared to the "old" stack.

Why only compare to the old stack? When you’re evaluating a brand new solution would should be looking for the best one, not any solution that improves your current situation.

Go look at the lighthouse score on my blog: https://sequoia.makes.software/

Also a 100 on performance & time to interactive 0.9 seconds. What are the key features of React that you use to set your blog apart from mine?

That's because the issue they're trying to solve is being slowed down by existing JavaScript tooling and infra. This is very explicitly to improve Dev UX. And they already called out the most important concern when switching to a new lib:

> The framework is heavily optimized for performance.