React Native: A year in review
code.facebook.com
code.facebook.com
However, I'm still not convinced that it makes sense to use a cross platform toolkit if the app is your primary product. If you just need some kind of mobile support for an existing business or service then React Native is a smart choice. But if the app is your bread & butter I think there are still too many drawbacks to working at an abstraction so far removed from the core native APIs.
And as much as JS has improved recently I'd still prefer to work in Swift or Java (or Kotlin) if I have the option.
I wish react native the best and I am going to use it some times (it has lots of perfect use cases in simpler apps, in my opinion), but for more involved projects, I would still choose Java/Swift (and how about a react style framework in the native frameworks?) :)
To me, Xamarin is like programming for each platform, just in C# and with another layer of bugs (and weirdness, I would say, and don't even mention Xamarin Forms). Of course, you get the possibility to share BL in a common layer, but pay for it in terms of instability and complexity to get stuff working native-like. Good for trivial GUI, BL-heavy apps I guess, but not for complex GUI, little shared BL apps.
PhoneGap/Cordova has some serious complications when it comes to predictable rendering due to the plethora of possible rendering engines you may encounter. Any non-trivial layout/styling can be completely messed up on different platforms, or even different versions of the same platform. Also it can be a challenge to achieve native performance and feel.
How would you say React Native compares?
It seems it could be more able to adapt to the platform compared to PhoneGap/Cordova, and easier (perhaps) to work with than Xamarin.
I'm considering using it in an upcoming project where both Android and iOS are required, and given my lack of iOS-experience, it seems like a good alternative.
Port to android in swift code base: https://github.com/apple/swift/pull/1442
One thing that is not clear is their direction with Redux vs Relay. In the F8 app, they're actually using both in separate portion of the app. I understand the guy behind Redux is now working for Facebook. Are they going to combine Redux with Relay? Or build Redux+GraphQL? Both techs has seemingly similar use case.
Relay makes it easy to query for data that lives on the server and is backed by a schema. Redux makes it easy to map actions into a local state. In most apps you'll have a need for both.
The Relay team publish their roadmaps publicly. I believe there is a plan to eventually handle client state.
In my eyes, the biggest pain points right now are: list views and complex gestures. List views don't recycle native views so memory usage can be very high (but there are some people working on solving this), and complex gestures just aren't really supported -- and by that I mean something like multi-touch to drag multiple slides in Keynote and a bunch of the crazy stuff that the Apple Maps app does (see https://www.youtube.com/watch?v=uBYPqb83C7k for more info on this). Also potentially of interest, see these slides: https://www.dropbox.com/s/fr46d25zfm6oaqu/philly.key?dl=0 (warning: requires Keynote and 1.2gb because lots of video!)
One of the problems with this is that under the current React Native architecture we would need to break the async bridge model by synchronously calling into JS in response to these methods. So some people are experimenting with a slightly different architecture that would allow us to respond to them synchronously from the main thread, which seems really promising :)
Would you recommend using React Native instead of developing Android apps the traditional way if I don't already have experience with Android development?
NFC: Except for payment, I never used NFC for anything, never seen any of my friends use it for any practical purpose. If your app is using payment systems, forget react native.
GPS: Supported by React native.
It sounded too good to be true. I'll give it more time to mature.
I guess reading this thread makes me choose native android.
In other words, do you think it'll be in a usable state once it's polished and matured?
http://complexview.com/apps/rgb-logic/index.html
I code in both Swift and Java (and a little Kotlin) but I think RN was better for this project:
* Cross platform with very little extra effort (it only took a couple of hours to take iOS version, make quite a few improvements to both versions and a few changes for Android and ship it).
* The game relies on a somewhat complex UI with simple updates... React/Javascript makes this kind of thing a lot easier to code than say using some kind of complex custom state/view objects in Java.
* Adding a tutorial was way easier thanks to Javascript's blurring of code and data
* Live reload (and now hot reload!) are amazing. Better than than even Android Studio's new "instant" run.
React is awesome and I love the promise of using the same concepts for native apps, but there is still a large commitment required to hand write a lot of extra code for full support on multiple platforms.
For now, Appcelerator Titanium is my tool of choice for cross-platform apps. It has much more stable cross-platform APIs and support, but even it has several quirks here and there, and doesn't support some more modern JavaScript features (ES2015, fetch, Promise) like React Native does out of the box.
This isn't even a comprehensive list as it doesn't include apps like TaskRabbit Tasker App (http://tech.taskrabbit.com/blog/2016/03/24/react-native-andr...) which aren't public-facing.
There's so much hype surrounding this framework, but also a lot of criticism and its extremely difficult as an inexperienced outsider to quickly determine whether or not React Native is suitable for a given project.
When I look at another cross platform framework like Qt, I can usually get a better idea of what it can do. But with React Native, its way harder to get that big picture because it seems like it wraps some native components but not all of them, etc.
Everything I read about React, especially from Facebook just seems like a puff piece. Because I know there are Facebook devs browsing this: please consider writing a proper summary.
If you have junior devs, having them learn one framework would likely be far easier than different ones for different environments. Personally, I really enjoy thinking in react. Its opened my eyes up to opportunities, relation and application to Oop in general.
IMO encouraging you to isolate state management is the biggest win. JSX and component-based abstraction are really fucking powerful too though.
[1]: https://facebook.github.io/react/docs/getting-started.html
I still had to set up all this mobile dev environment boilerplate...
Well, maybe I'm too pampered from web-development, haha
npm install -g react-native
git clone http://github.com/facebook/react-native/android-boilerplate
cd ....
npm runMobile development feels a bit clunky to me :\
Or is React Native consciously intended as a tradeoff between UX and development time?
https://facebook.github.io/react-native/docs/style.html#cont...
The app has to judge the image height after the image is finished loading from the network. If the second image loads faster than the first image, then UI has to push the second image further below to make space for the first image. This will make the app look jittery.
I've had a great year with React Native. The number one selling point of the platform for me is productivity; I can create mobile apps and iterate on them awfully quickly compared to what I was able to achieve with native iOS (never worked on Android).