Live data from Hacker News

Why I moved from Angular to React

robinwieruch.de

61–70 of 107 posts

Re: Why I moved from Angular to React

#61

All these discussions miss the point to me: React can be run natively on Android and iOS. Can Angular? Vue? Elm? It seems like there can't be any real competition when starting a large class of new projects until the answer is "yes." So I'm asking: what are the best real alternatives that work natively on mobile?

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.

Re: Why I moved from Angular to React

#62

I've used ExtJS, Backbone, CanJS, Angular, Polymer and React commercially. To me, React is a more complex alternative to Google's Polymer framework. In React, a component is made up of code which has HTML inside it. In Polymer, a component is made up of HTML which has code inside it. They're actually the inverse of each other but the result is almost exactly the same - Both libraries allow you to build components whi…

On the flip side, React's composability and generic component rendering concept allows it to be reused across many non-HTML platforms, including React Native, ReactVR, and more (per this list of React renderers: http://iamdustan.com/react-renderers/ ).

Also, fwiw, Facebook didn't invent Redux, Dan Abramov and Andrew Clark did _before_ they joined the React team :)

Re: Why I moved from Angular to React

#63
post #56

I'm glad this conversation continues to evolve, particularly now that Angular(2?) has stabilized. Practically speaking though, I'm evaluating high-level frameworks like Blueprint, Clarity, and Element, vs. the prospect of becoming a bespoke framework provider myself (probably not). If I'm starting off with a respectable set of components, then I can adapt to the lower level libraries as necessary.

I'm pretty happy with Semantic-UI-React myself ( http://react.semantic-ui.com/ ). Blueprint does look pretty well designed, too.

Re: Why I moved from Angular to React

#64

How many of you developers who use React and say that JSX is the second coming of Jesus, are also able to produce a semantically coherent HTML document with JSX? It seems to me that React + JSX are perfect for "divitists" and devs who use a h3 because its font-size has the desired value. I'm not being sarcastic, I genuinely can't understand why a good web developer who cares about the meaning of a HTML document shoul…

I must be completely missing your point. React supports the vast majority of html elements. There's nothing I can think of about React that would encourage someone to misuse html, you're using the exact same tags you'd be using to create a vanilla site. The only difference is that you're declaratively defining how they change based on state.

A good html developer will still use best practices when using React, a bad one won't. What's the difference?

Re: Why I moved from Angular to React

#65

All these discussions miss the point to me: React can be run natively on Android and iOS. Can Angular? Vue? Elm? It seems like there can't be any real competition when starting a large class of new projects until the answer is "yes." So I'm asking: what are the best real alternatives that work natively on mobile?

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?

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

#66

I've used ExtJS, Backbone, CanJS, Angular, Polymer and React commercially. To me, React is a more complex alternative to Google's Polymer framework. In React, a component is made up of code which has HTML inside it. In Polymer, a component is made up of HTML which has code inside it. They're actually the inverse of each other but the result is almost exactly the same - Both libraries allow you to build components whi…

On the flip side, React's composability and generic component rendering concept allows it to be reused across many non-HTML platforms, including React Native, ReactVR, and more (per this list of React renderers: http://iamdustan.com/react-renderers/ ). Also, fwiw, Facebook didn't invent Redux, Dan Abramov and Andrew Clark did _before_ they joined the React team :)

There is nothing inherent to React which makes it easier to render on native platforms. This could easily be achieved with Polymer too - It's just that the Polymer community is much smaller so they're behind in that respect.

Re: Why I moved from Angular to React

#67
post #25
post #7

Earlier quoted context omitted.

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.

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.

Post reply on HN