Live data from Hacker News

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

giuseppegurgone.com

51–60 of 163 posts

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

#51
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 rarely experience any of these issues and think their front end is quite good. Just their a11y / keyboard nav stuff is some of the best I've seen. Some questionable design choices but that's more of a product thing

You literally can't use the site properly when you're not logged in (and I mean basic clicking on retweeted/quoted stuff shows a login page, clicking on people's names shows a login page etc.) - how is that good? (I mean sure, build your walled garden as you please, but then you have no business showing in search engine results.)

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

#52
post #42

Too much complexity with garbage excuses. A lot of the web is like that now. You can't link to a specific tweet. 'Nuff said

> You can't link to a specific tweet. 'Nuff said What? https://twitter.com/Twitter/status/1433462575438643206

Not possible for a single tweet that is deep in a thread of replies. You can only link the topmost tweet

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

#53
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 wish they still did server side rendering for your feed. They switched to all client rendering a while ago and it takes a lot longer to load now. I wonder if the loading speed tradeoff was consciously made or if it was just a fait accompli after some rewrite or another.

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

#54

Earlier quoted context omitted.

I rarely experience any of these issues and think their front end is quite good. Just their a11y / keyboard nav stuff is some of the best I've seen. Some questionable design choices but that's more of a product thing

You literally can't use the site properly when you're not logged in (and I mean basic clicking on retweeted/quoted stuff shows a login page, clicking on people's names shows a login page etc.) - how is that good? (I mean sure, build your walled garden as you please, but then you have no business showing in search engine results.)

Certainly a dark pattern, but has little to do with the actual usability of the product once you’re logged in.

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

#55

Earlier quoted context omitted.

Not really as you'll have to do that work anyway if it doesn't exist. It's better to do a small extension than to duplicate all of your other shared code just to do that change. Most of the time there will already be a 3rd party extension, but it's really easy to make them. You will need some slight native experience, but you would need more for a full native app. With Titanium it wasn't easy to do these extensions,…

Point being these are leaky abstractions. You have to have some measure of knowledge as to how the underlying platform works in a professional context.

The abstractions depend on the dev. The knowledge needed is considerably less to make an extension vs making a full native app.

RN is useful if you're a solo dev, like myself, or a small team and you want to support all platforms.

I have enough knowledge to get all my apps in production, enough to make extensions for the platforms, and quite a bit in web to remake native features on the web. I am not what I consider an Apple or Android dev though, far from it.

I can learn from a middle out approach when it comes to all platforms. Similar to compilers and such, you can always go lower level to understand more and more, but it's not needed to get your vision out.

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

#56
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…

I'm a solo developer, and I have a project that totally can do it. I've done the proof-of-concept in an afternoon, but am mostly focused on web stuff atm.

Granted, it leverages NativeScript, but it's really not that hard once you have that.

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

#57
post #42

Earlier quoted context omitted.

> You can't link to a specific tweet. 'Nuff said What? https://twitter.com/Twitter/status/1433462575438643206

Not possible for a single tweet that is deep in a thread of replies. You can only link the topmost tweet

From the same thread I linked before: https://twitter.com/MR_Professor45/status/143346428085096038... - they give you context, if that's what you're meaning? But that is how it should work.

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

#58
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.

The thing that drives me crazy is that it breaks a basic feature of the browser, which is that if you load a bunch of tweets in your feed and then ctl-f to search for something, it doesn't work (on Chrome, at least); it doesn't find stuff that's on the page.

This is particularly frustrating, because my normal use case for this is that a bunch of new stuff loaded, which throws everything that's on the page already out of order, so then I can't see something that I know was there, that I was just looking at, and now searching for it doesn't work, either.

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

#59
post #57

Earlier quoted context omitted.

Not possible for a single tweet that is deep in a thread of replies. You can only link the topmost tweet

From the same thread I linked before: https://twitter.com/MR_Professor45/status/143346428085096038... - they give you context, if that's what you're meaning? But that is how it should work.

Maybe they fixed it? For very long time you couldn't show a specific tweet in a long thread with more than ~20 tweets, it would default to the topmost one with the relevant usually hidden behind "show more"

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

#60
post #15

The classic mistake of thinking role=button replaces . It doesn't (as mentioned in the linked PR comments). Native HTML buttons are supported by all user agents and assistive technology and provide keyboard and focus requirements by default [1]. The "short answer" they give as to why they did this (a flexbox bug) links to a comment from February saying this was fixed in Firefox 63. https://developer.mozilla.org/en-US…

At least they were thorough enough in their re-implementation of to include activation by pressing either Enter/Return or Space bar.
Post reply on HN