News for hackers. Stuff that matters.
Re:Introducing Create React Native App by stevepotter on Monday March 13, 2017 @05:41PM (#13862709)
I've been doing iOS and Android for about 6 years. My latest project uses React Native. We just finished an app for both iOS and Android that has over 100 screens and did it in only 3 months with a small team. So I'm a good authority on this subject.

I found React Native to be a mix of joy and frustration. I was amazed at how quickly our devs, who came from the web, could build polished screens that performed beautifully. Then I would become baffled at how, for example, you couldn't do a background upload in React Native. Here - it does is upload a file in the background: https://github.com/Vydia/react-native-background-upload

In RN, you have to connect JavaScript to native code with "bridges". If a bridge exists for, say, getting GPS data, you are fine. But if it doesn't, welcome to the club. I finally became relatively adept at writing these bridges, but I would have much rather have spent that time writing code for my app.

Their build system is weak. For example, the build scripts hardcode 'dev mode' unless you have a build scheme in iOS and Android called 'release'. It felt like nobody else had built RN apps that have beta and staging environments. Crash reporting sucks and we finally got it working with sentry.io and some custom build scripts to upload source maps so we could get decent JS error reports.

But that stuff will go away in time. I was blown away at the progress we made. It was painless for web devs to jump right in an be productive. So for us it's a net positive.

If you're starting something new, try it out. Make your platform choice carefully. RN isn't the only game in town. See what works for you. And don't get fooled into thinking that you don't need any native knowledge to make an app. Maybe hello world, but nothing industrial grade.

Re:Introducing Create React Native App by htormey on Monday March 13, 2017 @06:43PM (#13863216)
Pretty much agree with everything you said. I'm an iOS/Android dev with about 7 years of mobile development experience and I have shipped two apps using React Native.

I think the biggest problem with adopting React Native in a shop that already has a native team is politics. Lots of Native developers don't want to touch it.

I think it's a great fit for companies who already have a React front end team and who's mobile teams are at least open to giving it a try.

Re:Introducing Create React Native App by j2kun on Monday March 13, 2017 @11:38PM (#13864788)
> Their build system is weak.

I feel like this is a huge understatement. Doing anything non-default takes ages to configure, and there's so little documentation to help you out.

Re:Introducing Create React Native App by stevepotter on Tuesday March 14, 2017 @12:07PM (#13868709)
Not only that, the team is resistant to enhancing the build system. Example of one of my struggles: https://github.com/facebook/react-native/pull/11711

On a side note, their build scripts are all js and node is probably my last choice for build scripts. As a result, you have callbacks and promises everywhere. I understand they don't want people installing more dependencies but using something common like Ruby would make it much easier to build great build tools.

Re:Introducing Create React Native App by DenisM on Monday March 13, 2017 @05:50PM (#13862778)
>RN isn't the only game in town.

What else is there that's similar? NativeScript?

Re:Introducing Create React Native App by SureshG on Monday March 13, 2017 @06:16PM (#13862996)
Flutter - https://flutter.io/ , but it's in Dart!
Re:Introducing Create React Native App by woogley on Monday March 13, 2017 @06:16PM (#13862993)
I heard about https://weex-project.io/ by way of the Vue docs. There might be other projects too
Re:Introducing Create React Native App by sheraz on Monday March 13, 2017 @07:04PM (#13863387)
There is Appcelerator Titanium which has been in the javascript native mobile app game for 5+ years.

https://www.appcelerator.com

Re:Introducing Create React Native App by tqkxzugoaupvwqr on Monday March 13, 2017 @07:25PM (#13863531)
I used Appcelerator Titanium to build a couple of apps a few years ago (2011–2012).

The positive: If you know JavaScript, you can get started quickly because they provide a JavaScript API and all your code is in JavaScript. Under the hood the JavaScript connects to native code. So you get a native look and feel on iOS and Android. You have a single codebase.

The negative: Back then it was impossibly hard to get an app working and/or looking correctly on both iOS and Android at the same time because Titanium was full of bugs. So many bugs. This is because for each platform they have to provide native code. Sometimes their iOS code had bugs, sometimes their Android code. It was absolutely frustrating. I often had to find workarounds which caused a lot of delay so I had to double down to keep the deadline. Titanium was a reason I quit that job after 1.5 years.

On paper it’s nice, but the implementation was terrible. I went back to web apps and have since been happy.

Re:Introducing Create React Native App by mgkimsal on Monday March 13, 2017 @08:09PM (#13863788)
It seemed to me Appcelerator sort of abandoned the smaller/hobbyist/indie market for enterprise. I was using it in 2013/2014 and went to one of their conferences in 2014 - activity seemed to really slow to a crawl in public (hyperloop was announced, and the demo looked great, but I never saw much after that).

$40/month, but no visual builder. Eclipse-based IDE tooling (which was always flakey ime). $100/month/seat to get hyperloop and visual builder. Still not sure what 'arrow' is exactly.

The demos always looked good, but my day to day was... frustrating after a while. Possibly could have stuck with it and justified with "sunk cost" but I started looking more closely at cordova stuff. Yes, it's not pure 'native' (why I liked titanium) but the ecosystem is more flexible (or so it seems).

Re:Introducing Create React Native App by ourcat on Monday March 13, 2017 @07:58PM (#13863736)
I've been using Titanium for years. Still do. It can be frustrating at times yes, but through using it so long, I've now learned enough Objective-C and Java to fix things or build modules to add functionality. Not enough to build an app, but it's been an enjoyable learning curve.
Re:Introducing Create React Native App by raarts on Monday March 13, 2017 @06:40PM (#13863198)
Re:Introducing Create React Native App by s369610 on Monday March 13, 2017 @07:04PM (#13863384)
Xamarin with Xamarin Forms Xaml
Re:Introducing Create React Native App by whatever_dude on Monday March 13, 2017 @09:24PM (#13864172)
All of those comparisons are missing the point.

RN is not perfect, but it's leagues ahead of Cordova, Xamarin, and etc in a combination of performance and easiness of UI development.

Re:Introducing Create React Native App by yellowapple on Monday March 13, 2017 @06:15PM (#13862987)
Cordova comes to mind (in the "write 'native' apps like web apps" sense, at least).
Re:Introducing Create React Native App by georgefrick on Monday March 13, 2017 @10:30PM (#13864486)
Ionic (2) ? I've been using that with great results.
Re:Introducing Create React Native App by WaxProlix on Monday March 13, 2017 @06:18PM (#13863021)
Not JS/webdev friendly, but things like Xamarin or Kivy (or Qt or whatever) come to mind for cross-platform native-esque user interface building.
Re:Introducing Create React Native App by crystalPalace on Tuesday March 14, 2017 @01:02AM (#13865145)
FreePascal compiles to Android and iOS.
Re:Introducing Create React Native App by zerr on Sunday March 19, 2017 @01:07PM (#13908271)
Embarcadero Firemonkey.
Re:Introducing Create React Native App by the_mitsuhiko on Tuesday March 14, 2017 @02:59AM (#13865605)
> Crash reporting sucks and we finally got it working with sentry.io and some custom build scripts to upload source maps

For what it's worth for react-native proper we are investing a lot of time into this now. With latest sentry-cli getting sourcemaps going is a one-line change to your build script.

https://docs.sentry.io/clients/react-native/#updating-build-... (you only need the line with react-native-xcode)

Re:Introducing Create React Native App by farm_code on Monday March 13, 2017 @10:18PM (#13864426)
How is the maintenance of the app compared to the native code in terms of upgrading?
Re:Introducing Create React Native App by dsirola on Tuesday March 14, 2017 @01:53AM (#13865331)
I just spent whole day yesterday trying to upgrade RN0.40 -> RN0.42. It's a nightmare because there are conflicts in xcodeproj file and you have to manually merge them.
Re:Introducing Create React Native App by stevepotter on Tuesday March 14, 2017 @12:08PM (#13868726)
It sucks. Their default upgrade tool does more harm than good. Currently I start a new RN project then do a diff to see what I have to update on our actual app. Fun, right?