Re:Why I moved from Angular to React
by LeoNatan25 on Monday February 06, 2017 @07:55PM
(#13585963)
How is React running natively in React Native? The most basic things are reimplemented (quite badly) in JS, such as controller navigation (for the lack of a better term), buttons, gestures, animations. Most of them run on the JS stack, which is run on a JavaScriptCore VM instance, the same VM running when using a web view. How is any of that native? For me, "native" means using only OS-native components for navigation and views, gesture handling, animations, interactions, etc., and also, do not run in additional VMs. If you are willing to let go of the last requirement, NativeScript and Xamarin are a lot more sensible "native" choices than React Native.
The choice of words was poor, but the point of the original poster, I think, were clear.
React-native provides react with primitives that are native (such as View, Button etc...).
Navigation is also native (as in the transitions are native).
Until angular or vue can run withou the dom (which is the #1 reason for performance issues in wwb apps), they cannot compete with react.
Re:Why I moved from Angular to React
by LeoNatan25 on Tuesday February 07, 2017 @07:42AM
(#13588945)
Transitions are not native. They are simulated to appear as if native from JS.
Re:Why I moved from Angular to React
by bobbytherobot on Monday February 06, 2017 @03:27PM
(#13583522)
I think the React Native is pretty cool. React Native doesn't take your web JavaScript and turn it into a mobile app. It is using the React library with the native UI view objects.
Those are two different problems: what is the best framework for our web front-end vs what is the best framework for our iOS front-end. If you want to normalize on React for both, what is the problem that you are solving by doing that?
Re:Why I moved from Angular to React
by LeoNatan25 on Monday February 06, 2017 @08:02PM
(#13586003)
Almost none of the views used internally in React Native are "native". On iOS, only UIView, UIScrollView and UITextView are used, and every component is reimplemented from the JS side with some help with reinvent-the-wheel type native support. Button with highlight? JS animation on a text container view with a JS tap recognizer. Yes, even gesutre recognizers are implemented in JS, rather than using the native gesture recognizers. Animations - the same. Recently, due to great pressure from the community, some animations were added in native - and are still reinvent-the-wheel type animations, rather than using the OS-provided animation facilities. Controls already do not look or feel native, and once the OS changes its small details some more, it will require FB or the open source community to again reimplement the wheel, and then either have to support both old and new looks and feels, or only support new ones and look out of place for people that have the old OS yet (think of the iOS 6 -> iOS 7 transition, and how RN would look like on iOS 6 once they reinvented the wheel and implemented the iOS 7 look and feel).
Re:Why I moved from Angular to React
by badreaction on Monday February 06, 2017 @03:54PM
(#13583797)
React Native is just a renderer
https://github.com/angular/react-native-renderer
Well, there's https://weex-project.io/ which claims to be easy the "React for Vue" you're asking about.
The only caveat is that you'd better be reading Chinese version of documentation with Google Translate, English one is basically one huge "to be done" placeholder.
Re:Why I moved from Angular to React
by dhbradshaw on Monday February 06, 2017 @04:41PM
(#13584380)
Yeah, I had actually looked through this documentation. It's state of readiness convinced me that it wasn't yet a viable solution.
Check out NativeScript, you can use Angular 2 to build native mobile apps.
I'm still torn, most everyone I have talked too that did a non native app said they would never do it again and would rather do native.
NativeScript does make native apps. It's in the name.
Re:Why I moved from Angular to React
by LeoNatan25 on Monday February 06, 2017 @08:10PM
(#13586042)
Agree that NativeScript is the most "native" of the JS cross platform tools, since it can use actual native concepts, such as controllers, views, gesture recognizers, etc, whereas things like RN throw the "native" word everywhere, but actually implement everything internally in JS. A small example - a tap gesture in RN is actually implemented using `touchesBegan:` API, which routes input to JS over RN bridge, JS performs the tap logic. Doesn't sound terrible, but consider that the RN bridge is async, so the user experiences a floaty behavior, and if that single JS thread is busy with some business logic, you are dead. Same for animations and interactions. Navigation is a joke, with current and other implementations being JS replicas of the real thing, and the native NavigatorIOS, the one to use actual native iOS concepts, being deprecated.
NativeScript also has a novel idea how to implement multithreading in JS, which is commendable.
So I'm asking: what are the best real alternatives that work natively on mobile?