Ask HN: Is React Native enough to justify using React over alternatives?

16 points by brightball ↗ HN
The discussion on Gitlab's choice of Vue.js got me wondering about everyone's thoughts on this. I hear a lot about front end frameworks but based on everything that I've read about React Native it seems that it gives me the impression that even if Vue or something else might be preferable - the potential cost/work/time savings of React Native would win the decision every time. Is there more to it?

9 comments

[ 5.9 ms ] story [ 36.4 ms ] thread
Honestly depends on your use case.

Do you absolutely need a native-feeling mobile app? React Native (and ultimately React) are worth your time and investment.

In Gitlab's case, Vue.js works well for them because their product is web-first and allows them to iterate quickly.

For the most part, I consider React Native separate from React entirely. I consider most startups to either be completely web or completely mobile, and to let questions in the former case be answered by validating and iterating on the product quickly with a web app.

At Infinite Red we chose React.js over our previous choice of Ember not because it was objectively better at web, but because it lowered the context switching when our devs would switch between mobile and web projects. We have many devs who only handle web or only handle mobile, but for the ones who can do both, it's well worth it.

React.js being superior/inferior to Vue.js or others isn't very relevant unless the gap is huge, which it's not.

There are certainly still alternatives to React Native such as Cordova and NativeScript, among others.

Some other frameworks have bindings to React Native using it as a just the final "renderer". CycleJS has a React Native binding, though I'm not currently aware of how well it works yet. I'm not aware of Vue.JS bindings for React Native, but it may be possible.

There's certainly a question of whether or not you need "native" to begin with. Cordova doesn't always feel "native", but it is reliable and reliable can be all some apps/dev-teams need.

Having just started a project in Swift due to some limitations with 'native' JS frameworks, I can honestly say I have _no_ idea why someone would use anything else unless they had a burning need for code reuse with Android.[0]

The quality of the language and documentation has been superb, and I feel more confident in my code than I did with another project written with JS bindings.

[0] I suppose the argument can be made that web-view components could be recycled with minimal effort, but that sounds like it'd be a worse story for end-users more often than not.

I'd like to respond with a real example if you don't mind.

We developped a native app that looks pretty much Instagram. It is written in Swift and Java due to reasons you can probably imagine.

React Native became handy when we wanted to add a payment flow that can have native like ux, remote updates (adding new offers, disabling some options due to sudden legal changes etc) and a shared codebase. React Native with Codepush was the perfect choice. It had native like performance, updates without involving app stores and most importantly ability to be maintained by our backend Node.js developers.

Was it worth the add the huge dependancy just for it? Arguably yes. Tooling is good, integrating it took only a day. App size didn't increase a lot. Our backend developers had the chance to use already established in-house utility libraries.

Our design was to implement a React hosting Activity, a Fragmentand and a UIViewController. No issues have yet be faced and it works like a charm (users have no idea those screen are backed a few lines of Coffeescript.

Sorry for the typos. That comment was written with my mobile in a hurry. :(
React-native is using native components not webviews, the business logic can be reused. To me the biggest upside is quick iteration livereload is very handy compared to purely native dev. flow.