Hacker News new | past | comments | ask | show | jobs | submit login

This looks super cool.

Rookie question from a Web dev here - what functionality does react native provide that isn't available on Web?




React using React Native is almost identical, with a few key differences:

1) No HTML elements. React Native provides some low level elements for views, text, etc. The rest depends on the platforms and packages you have installed. 2) You can't use CSS, so you use something that is similar to CSS (including flex box), but isn't cascading. 3) Since ultimately React Native results in native views being rendered, you can also use some of the native view debugging that exists. 4) Changes made in React are batched up and sent to the native side of things, which results in some performance characteristics you don't see on the web or native mobile. There is also a difference between iOS and Android performance. You feel this a lot more on mobile than on the web.


1. you can code share with iOS and Android. 2. the primitives provided by React Native solve the many bugs you get from low-level CSS and HTML.

there are many other reasons, I touch on all of them in my Next.js + React Native talk at Next.js Conf: https://www.youtube.com/watch?v=0lnbdRweJtA

I built https://beatgig.com with React Native and Next.js as the only front-end engineer and designer, and our iOS app and website share 99% of code across hundreds of screens.


The benefit is that you can make an app with platform-native views and navigation. If you don't care about this native "feel" than it doesn't matter and capacitor may be a better choice if you just need access to some hardware or push notifications.

I have personally drunken the kool-aid to the extend that I'd rather develop a pure web project with react-native-web because I like the choices/constraints it introduces but I don't think that's the case for most people.


I would guess that the point is to share more code between web and mobile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: