Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd use react-native if I were you.

I think you'd pick up Swift pretty easily given your polyglot background, but if you already know javascript and you aren't doing something that screams to be native, RN would be my choice. You'll get to work in a familiar language, and get an Android version with much less work than if you do swift.

Best resource to start a react native app I'd say is this, it was really easy for me: https://facebook.github.io/react-native/docs/getting-started...

For Swift, here's a page from Apple, but I just plucked it from Google: https://developer.apple.com/swift/blog/?id=16



Don’t use React Native.

There is little “native” about React Native. It’s something web “devs” like to convince themselves because they don’t know better.

Using merely UIView objects does not mean it is native. It’s not just an abstraction over native. The “great” minds at Facebook have decided to not only offer a JS wrapper around the native APIs and objects, but actually reinvent the wheel on everything. Tables? Let’s have a horrible implementation in JS. Gestures? Slow ones in JS. Navigation? Absolutely terrible in JS. Animations? Core Animation you say? Nope, in JS or in C++. Even simple stuff like buttons are not native UIButton objects. There is nothing “native” in React Native.

Also, the single threaded model of JS just does not scale. The larger the app gets, the more and more it starts to lag. UI is rendering at 60 FPS, sure, but the lag comes from a constantly busy single JS thread.

And that’s before mentioning things like accessibility, large type support, basic iOS concepts such as margins and layout guides, etc. that are sorely missing from RN.


“I want to learn how to fly a Cessna where should I start?”

“I’d recommend hang gliding. That way, you don’t have to worry about the complexities of piston engines. Since you already know how to fly a kite, you’re practically there already.”

While hang gliders and Cessnas are both flying, there are a lot of things Cessna can do that hang gliders can’t.

I will be glad when JavaScript stops being the answer to every question. iOS apps aren’t just webpages running on a phone. How, for example, does react handle pre-release Apple APIs? How does it work with ARKit or other iOS specific tech?

Why do we insist on building to quite literally the lowest common denominator rather than building to the strengths of iOS and Android?

React Native could be a prudent choice for certain kinds of apps, but I’d argue that the apps for which React Native excels probably don’t need to be apps in the first place.

Apps ought not be glorified web pages; they should take advantage of the hardware to the fullest extent.

If an actual Swift developer recommends React Native, I might listen, but generally it’s web developers who downplay the advantages of Swift because they themselves have been unwilling to learn how to get the most out of it and the iOS APIs.

This whole cross-platform obsession results in lower quality applications. Case in point: Slack for Mac OS. It’s decent, but it would be significantly better if it were actually native. This trend of wrapping a webpage and calling it an app is a disservice to your customers.

There’s a reason I have an iPhone. Yet, with this cross-platform nonsense, developers are essentially kneecapping our devices. This applies to Android as well.


I evaluated react native and I really like what I saw and was on the edge to use it. BUT, I am still afraid that it will bite me somewhere in time where it will hurt much. For example, I want to build an app with 50% standard interface stuff and about 50% custom, with some animations throughout the interface. From what I gathered reading other people experiences it would be a bit of a pain in react native. And the other smaller reason is that I want to build native macOS app that goes along with it and as far as I can tell from my own experience, only natively written apps feel good on osx. And just don`t mention Electron, I hate it.


I think it is best to write the "core" of your application using a language that can run on all of your target platforms -- which typically means you'll have to use C/C++/Rust or something similar that can be compiled to native code and supports somewhat sane FFI. The UI for each platform should be done using the Native UI toolkit for the platform. That way, you can avoid most of the code duplication.

If you plan to target Android, you might want to check out Google's Java to Objective-C transpiler[1]. That will let you write the core of the app in Java and transpire it to Objective-C for iOS and macOS. The UI will still have to be written using the native toolkit for the platform, though. Fair warning: I have no idea how good or bad it is -- never used it myself.

[1] https://github.com/google/j2objc


React-native animations have come a long way. I think your concerns are real, but you'd be pleasantly surprised. You might want to dip your toes, see how far you get in a day and how it feels.

Article on animation improvements from Feb: https://facebook.github.io/react-native/blog/2017/02/14/usin...


Have you evaluated TypeScript native?

I prefer TS over JS, and I wonder how well it is supported, or if that is even an issue.


> And just don`t mention Electron, I hate it.

Election is the new Flash. All hail new Flash! /s

Seriously, how do supposedly smart people come up with things like Electron?


Why was it downvoted?


Sarcastic comments repeating the sentiment of the parent don't add value to the discussion.


Because you didn't mention what specifically is wrong with Electron


IMO flutter.io looks a lot more promising (navigation isn't a mess, for example) but really native is the way to go. I'm biased towards native as that's what I do day to day.

React Native is more fun to work with than PhoneGap though (I've shipped apps with the latter and really hated it).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: