Live data from Hacker News

Twitter.com's HTML, which is produced by React Native for Web, explained

giuseppegurgone.com

121–130 of 163 posts

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#122
post #31

Twitter's website is absolute garbage, the feed is unresponsive, tweets fail to load, it's just terrible. If you're modeling your frontend off of anything please do not pick Twitter because their web experience is awful.

I'm thinking about building a Reddit-like Twitter client that has sane conversation threading and better discovery. Would that be of interest?

I built one of those. Twitter's API isn't going to do you any favors. There is no publicly available API to get the replies to a tweet. So building out a full thread is hard. Then once you figure out how to use their internal API you'll quickly hit rate limits </3

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#123
post #100
post #90

Earlier quoted context omitted.

About 90% of my interaction with Twitter is is clicking a link from HN. When I do so, there's about a 1/3 chance that tweet doesn't load.

I was under the impression this was an intentional dark pattern to get users to sign up / log in to twitter? The reason I believe this is because if you get that failure and back out and click the link again it works 100% of the time.

I get that too. It seems like it could have been some kind of race condition

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#124
post #31

Twitter's website is absolute garbage, the feed is unresponsive, tweets fail to load, it's just terrible. If you're modeling your frontend off of anything please do not pick Twitter because their web experience is awful.

I feel like an idiot trying to read threads on Twitter. I seriously get confused on where one begins, ends and everywhere in between. It's WAY too complicated of a layout for nothing more than a chronological list of text.

I have no affiliation with this site(1) but it is godsend if you're trying to read twitter threads. Makes you wonder why they can't have this in-built in twitter instead of what it is now.

(1) https://threadreaderapp.com/

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#125

Earlier quoted context omitted.

> Twitter is probably the best, most responsive web app I've ever used What machine are you running it on? I'm a regular Twitter user and it is hands down the slowest most unresponsive webapp I use: worse than Slack or Gmail. Fwiw probably the best complex responsive webapp I use is YouTube (loathe as I am to compliment anything produced by Google's web frontend teams as the rest of their webapps have been consistent…

What universe are you living in? Slack and GMail are horrendous compared to twitter. Twitter loads almost instantaneously. Only web app that correctly handles infinite scroll.

I'm living in a universe where Slack and Gmail are horrendous yes. That's why I brought them up as examples of low bars. Twitter is somehow even worse.

There's nothing "correct" about Twitter's infinite scroll: back button is never quite sure where in the timeline it should bring you. Occasionally the top or your last position, but most frequently a random tweet somewhere in between.

But the major issue isn't UX: I don't find it as bad as some here say. The real problem is the abysmal performance. Not just the load time (the page loads blank, then starts loading actual content) but then after everything is loaded every single interaction comes with enormous UI lag. Literally an active click-wait-click-wait cycle.

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#126
post #104
post #100

Earlier quoted context omitted.

I was under the impression this was an intentional dark pattern to get users to sign up / log in to twitter? The reason I believe this is because if you get that failure and back out and click the link again it works 100% of the time.

Why would you attribute that to a dark pattern? I would think that your first visit loaded a resource/set a state somewhere which let's the second visit go through. Much more likely to be a programming error then a purposeful decision by a PO as the end result is objectively terrible. I cannot imagine anyone getting convinced to register to a webpage that cannot even load. It's not that content is hidden behind a pop…

Because it's hard to believe that Twitter has been that incompetent for that long. It seems more likely that they're trying to push people to log in.

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#127
post #3

So pardon my ignorance but I thought React was already for web and React Native merely a set of tools to help port React web apps to native mobile apps. What is the difference between React for web and React Native for web?

It's simply React (for web), but for native, ported for web. Would be cool to see a react-native-web-native port to use react-native-web for native apps!

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#128
post #29

Earlier quoted context omitted.

An important distinction that often gets lost is that React itself is an abstract, standalone layer above web and native. It handles deciding what to render and when. When you learn the concepts of React, you're learning this layer. Then there are layers that decide how to render. Regular React has a renderer that accepts HTML tags spits out HTML for the browser. React Native has a renderer that accepts more abstract…

Adding to this - jsx (the templating that react and other libraries use) is compiled down to calls for React.createElement (this is configurable). And jsx is a sort of superset of html so it's not exactly html tags, it just looks a lot like it. https://www.typescriptlang.org/play?#code/DwEwlgbgfAsAUAAgcA...

> And jsx is a sort of superset of html

More accurately, JSX is shaped like HTML, and some of the the transforms for JSX to JS have built in special handling for the standard HTML tags.

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#129
post #8

I've been searching a stack which could allow for a single codebase to be rendered in Android, iOS, and the web, and React Native + React Native Web might be the top choice for that. Other competitor includes Flutter, which used to only render canvas on the web, but right now it seems they have an option to render as HTML as well. I bet the need for cross-platform stack might continue to rise in the future. It's just…

Same here, with the same conclusion. React may not be my favorite web framework, but the native ecosystem blows everything else out of the water. Desktop support is approaching “okay” (judging by the almost kinda somewhat native feeling flagship app Facebook Messenger on macOS), which puts it many kilometers ahead of any alternative. The main alternatives for native feeling apps seem to be Xamarin Forms and Qt Quick,…

Judging from KDE's Kirigami apps and Subsurface on Android, I would not describe Qt Quick apps as native-performing or feeling.

Re: Twitter.com's HTML, which is produced by React Native for Web, explained

#130
post #78

Earlier quoted context omitted.

This is genuinely what I see 50% of the time I go to Twitter. Every other big website can keep their site loading >99% of the time. The fact that Twitter can’t is beyond me, and speaks to their incompetence.

Been to Reddit lately? It's gotten better to be sure, but I have to reload or dance around with the back/forward buttons so often simply because I attempted to visit a page.

If you haven't heard of it: old.reddit.com

(I'm not even a Reddit user, but it shows up in search results and I get linked there.)

Post reply on HN