5 ms·
To be fair, "native" in this sense is exposing platform native UI components and libraries, which gives apps a native look and feel because, well, they _are_ na
by Mayzie 9y ago
To be fair, "native" in this sense is exposing platform native UI components and libraries, which gives apps a native look and feel because, well, they _are_ native. For most apps that's all you'll ever need, and the performance overheard of running JS is negligible. For any performance critical code, you can write them in the platforms native code and interface with them via JavaScript.
Unfortunately though, so many developers do not know how to write in the platforms preferred native language and you end up with components, like most of those listed on awesome-react-native[1], where they're entirely written in JS which:
* sometimes emulate the native look and feel (often poorly), not _are_ the look and feel, and,
* as a result, often perform super poorly compared to their native counterparts, and,
* if emulating the native look and feel, and not implementing their own design/UI (which most do), that look and feel can break between OS upgrades and feel out of place, and,
* often don't distinguish between platforms (i.e. the developer won't bother implementing the look and feel for Android, where the component is entirely compatible).
[1] - https://github.com/jondot/awesome-react-native https://github.com/jondot/awesome-react-native
- benjaminl 9y agoTo be truly fair the claim is "truly native", not just "native". If the claim was, native GUI, that would work, but "truly native" is a huge stretch. These apps are about as native as the Java based Eclipse IDE whose SWT based UI uses native GUI elements for display.
- wlesieutre 9y agoMy experience with React Native was that it doesn't consistently use native UI components, it uses UIViews that people have cobbled together into their own replications of varying quality. So if you want a big grid of items, you're not using a UICollectionView, you're reimplementing it yourself or finding someone else's attempt at that. Maybe this is because a UICollectionView doesn't have an identical counterpart on Android so it's easier to just redo it from scratch? But I'd be surprised if the performance of these things is as good as the real native ones, even if they make it out of UIViews. My other big complaint is that it doesn't help you with UI size classes. iOS apps change their layout depending on (generally) whether you're on an iPad (fullscreen / large split), or iPhone (and iPad small split, which is iPhone sized but much taller). The two weird exceptions being the iPad Pro having two full sized splits, and the Plus sized phones acting sort of iPad-like in landscape view. Anyone have an example of a React Native app that follows those conventions correctly? Last I checked the Facebook app (which I assume is something of a canonical example) doesn't even support split screen, and iOS 9 came out in 2015. This was a year or so ago that I was poking around at it, things may have improved since then?
- andrewingram 9y agoThe main Facebook app isn't React Native (though parts of it might be)
- wlesieutre 9y agoAh, interesting. I just assumed that's what they made it for.