There’s a lot of hype currently around React Native, so I recently decided to sink a good amount of time into it to give it a shot, and report back with my impressions. Admittedly, these are only a week’s worth of impressions so keep that in mind.
I spent a couple week’s worth of evenings developing a prototype for an app a friend and I wanted to run by a few businesses, see if there was any interesting in a full build-out. Long story short, we got market validation that the idea wasn’t what the industry wanted. But i did learn a lot about React Native in the meantime which I’ll now share.
There seems to be a lot of potential with React Native. It is an extraction rather than a framework. DHH, of rails fame, made this distinction years ago: good frameworks are extracted from things that are required to work, because many people’s paycheques/families/mortgages depend upon it. I’ll clarify: I assume it’s an extraction - we can’t know Facebook’s internal strategy specifically, but it certainly points that way (eg they use it for their Groups app and now the core Facebook app). My point here is that React Native is battle-hardened and production-ready, unlike say other write-once-deploy-on-ios-and-android frameworks which decidedly weren’t.
Working with Swift at scale is an exercise in frustration common to many teams - see Uber. Xcode cannot index, and compiles blow out exponentially once you hit ~20KLOC, depending largely on if you have many small files or fewer large ones. So the opportunity to change properties and see updates in an iOS simulator and an Android simulator on your computer within seconds is compelling. I can confirm that this aspect of React Native is productive.
Don’t be scared off because it’s Javascript. JS has come a long way since the 90s - ES6 really shines, with elegant syntax for classes, inheritance, avoiding var hoisting, and so on. Take full advantage of all this, because RN uses Babel to transpile your newest-style JS into whatever is necessary for iOS and Android’s runtimes.
And, in short: it’s not, well, terrible. Most other cross-mobile-platform JS frameworks like Titanium / Sencha Touch / PhoneGap / Cordova / Ionic, well, are. I think it’s on par with Xamarin in terms of production-readiness, however its live updates make React Native more productive.
Here’s a grab-bag of perspectives gained from my two weeks, in no particular order:
console.log('foo')
, then in the iOS sim, do Menu > Debug > Open system log.MyComponent.propTypes = { isSelected: React.PropTypes.bool, etc };
for of
instead of for in
.I recommend at least becoming familiar with React Native. As our industry matures and rates begin to drop, I think it’ll become increasingly compelling at job interviews to be able to say: I can deliver iOS and Android apps to the business for the price of one developer.
And here’s the prototype that was the result of, say, 10 hours work:
Thanks for reading! And if you want to get in touch, I'd love to hear from you: chris.hulbert at gmail.
(Comp Sci, Hons - UTS)
Software Developer (Freelancer / Contractor) in Australia.
I have worked at places such as Google, Cochlear, Assembly Payments, News Corp, Fox Sports, NineMSN, FetchTV, Coles, Woolworths, Trust Bank, and Westpac, among others. If you're looking for help developing an iOS app, drop me a line!
Get in touch:
[email protected]
github.com/chrishulbert
linkedin