Hacker News new | ask | show | jobs
by thelambentonion 3524 days ago
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.

2 comments

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.