Twitter.com's HTML, which is produced by React Native for Web, explained
31–40 of 163 posts
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#32React native I believe is the right approach given the current constraints, but I’d prefer that it would be possible to access native device apis via the browser. Does Twitter really benefit a native app? Perhaps, but it’s certainly not necessary . Ideally iOS and Android would simply expose native apis via browser and allow one to toggle access to said apis per site. My conspiracy theory is that the only reason this…
With React Native Web, that's exactly what this gives you. Basically you get a PWA for free with your app. All "native" features that you have can then use web device apis if they exist. Basically React Native Web allows you to have a lite version of your app that lives on the web.
That way if you preferred Vue, Angular, Ember, Elm, etc you could use that.
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#33So 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?
React and React Native are separate tools, and they don't play with each other. You actually need to build two separate apps and you don't get much of any re-use. For example, you can't use Material UI for React in React Native, and you can't build a React component library and just pull it into React Native. So if you want a fully cross platform React experience, you need React Native from the get-go and to compile…
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#34So 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?
React and React Native are separate tools, and they don't play with each other. You actually need to build two separate apps and you don't get much of any re-use. For example, you can't use Material UI for React in React Native, and you can't build a React component library and just pull it into React Native. So if you want a fully cross platform React experience, you need React Native from the get-go and to compile…
So anything you could do in React, you can also do in RNWeb, as it's a superset of React.
Of course, you'd need to use the RN components if you want to share code between web and native mobile. But there's nothing stopping you reaching a high degree of code re-use, and/or using React components for the web-only portion of a RNWeb project.
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#35Earlier quoted context omitted.
Cross-platform frameworks work great for basic CRUD apps but when you start to do things more complicated it can be a headache. Sometimes hardware and features you want to leverage are specific to the platform.
With React Native you can just use file.ios.js or file.windows.js etc if you want to do something different entirely for a platform. You can also check the platform with a function for minor adjustments. You can also handle these differences in a RN extension if they involve native code. You can model your codebase so the function stubs are the same, but the implementation differs based on platform. So you can use it…
Well if you need a specific widget or library that react native doesn't support by default you have to write bindings, and unless your business logic is very basic it happens most of the time. You might be lucky somebody already did write some bindings for you. As someone that used Titanium in the past, React Native suffers from the exact same problems.
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#36Twitter'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.
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#37You can't link to a specific tweet. 'Nuff said
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#38Earlier quoted context omitted.
With React Native Web, that's exactly what this gives you. Basically you get a PWA for free with your app. All "native" features that you have can then use web device apis if they exist. Basically React Native Web allows you to have a lite version of your app that lives on the web.
Yes, but then you must use React Native. What I’m describing is that you could use regular JavaScript to access native apis. That way if you preferred Vue, Angular, Ember, Elm, etc you could use that.
You can use something like Solid or JSX lite to maintain standard components that are compatible with most of those frameworks and web components.
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#39React native I believe is the right approach given the current constraints, but I’d prefer that it would be possible to access native device apis via the browser. Does Twitter really benefit a native app? Perhaps, but it’s certainly not necessary . Ideally iOS and Android would simply expose native apis via browser and allow one to toggle access to said apis per site. My conspiracy theory is that the only reason this…
Not when the different stores are so lucrative. Imagine that initially Jobs wanted people to stick to web apps and reserve native apps for Apple teams. fast foward 13 years, Apple made billions with their appstore.
Re: Twitter.com's HTML, which is produced by React Native for Web, explained
#40Earlier quoted context omitted.
Yes, but then you must use React Native. What I’m describing is that you could use regular JavaScript to access native apis. That way if you preferred Vue, Angular, Ember, Elm, etc you could use that.
Well you can, but the point of React is to abstract the view from the platform, not much more. You can use something like Solid or JSX lite to maintain standard components that are compatible with most of those frameworks and web components.
Even if you use web components that doesn’t change the fact that web apps don’t have access to native apis without compilation.