
React Native: A year in review - ihsw
https://code.facebook.com/posts/597378980427792/react-native-a-year-in-review
======
cageface
The React Native team has been doing phenomenal work and having just finished
my first React Native app it's definitely the first kit I'd reach for if I
needed to write a cross platform app.

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.

~~~
soft_dev_person
I've tried a couple cross platform frameworks (mostly Xamarin and
PhoneGap/Cordova) and am aware of some challenges there.

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.

~~~
woah
I did a React Native iOS project last summer, and you should be aware that you
do need to write a lot of native code to do non trivial things. Think of React
Native as more of a view layer than a whole framework, and realize that JS is
simply too slow to do things involving realtime reactions to sensor data
(including touch) or images, sound or video.

------
jaxondu
For those interested, Facebook has a site
[http://makeitopen.com](http://makeitopen.com) blogging about how they build
F8 (Reactive Native app for iOS and Android) for their recent conference.
Advisable to read only if you have some basic knowledge of React Native. Too
many techs: React, React Native, JSX, Flux, GraphQL, Relay, Redux, Flow, Jest,
Webpack.

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.

~~~
underwater
Relay and Redux serve different purposes.

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.

------
bsaul
A review that mentions no pain points at all reads a bit like an ad. It makes
me feel suspicious. Such a big change in the way people build apps can't go
without hurdles.

~~~
brentvatne
React Native uses a site called ProductPains for people to report the issues
that they run into and upvote them, it can give you a good idea of what the
problems are: [https://productpains.com/product/react-
native?tab=top](https://productpains.com/product/react-native?tab=top)

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](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](https://www.dropbox.com/s/fr46d25zfm6oaqu/philly.key?dl=0)
(warning: requires Keynote and 1.2gb because lots of video!)

~~~
mwcampbell
This is probably a frequently asked question, but why doesn't React Native
implement its own list views, rather than wrapping UITableView (for iOS) and
ListView (for Android)? I figured the latter approach would be the best way to
address things like recycling native views.

~~~
brentvatne
The short answer is that UITableView is an inherently synchronous API whereas
the React Native bridge is asynchronous -- UITableView calls
cellForRowAtIndexPath:indexPath: and heightForRowAtIndexPath:indexPath: and
you need to respond synchronously with the view for and the height of that
cell.

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 :)

------
kyriakos
Stupid question: anyone using React Native on Android in production (other
than Facebook that is)?

Would you recommend using React Native instead of developing Android apps the
traditional way if I don't already have experience with Android development?

~~~
wentoodeep
4 months with react-native, pretty unstable environment, lots of headache.
Went back to native and happy.

~~~
agnivade
Thanks. That cleared up a lot of doubts for me. I was in 2 minds, trying to
start app development with native android or react-native.

I guess reading this thread makes me choose native android.

~~~
vbezhenar
IMO if you can afford to spend double time rewriting your app for another
platform, just use native and don't think twice. But if you are constrained,
react native might be a good choice among current cross-platform solutions.

------
twreactistricky
Is there a 1,000 ft overview of React Native with a brief description of how
it works, its capabilities and its limitations out there?

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.

~~~
rymohr
Are you familiar with the benefits of React in general?

~~~
twreactistricky
No, I'm not a web developer. I've tried reading some React articles. There are
lots of points that are brought up again and again (diffing for minimal
incremental updates, unidirectional flow, etc) that I find really hard to care
about since I've never encountered them in the kind of native development I
do.

~~~
rymohr
Just because you aren't a web developer doesn't mean you can't dabble in web
development. Take 30 mins to play with their starter kit [1] or just play
around inside JSFiddle [2]. Now imagine being able to encapsulate your native
components the same way.

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](https://facebook.github.io/react/docs/getting-started.html)

[2]:
[https://jsfiddle.net/reactjs/69z2wepo/](https://jsfiddle.net/reactjs/69z2wepo/)

------
ausjke
Ionic2 + Angularjs2 stills looks easier in this case, i.e. for simple/non-
performance-critical apps you can do angularjs then use ionic2 to get cross-
platform apps, for native performance you stick with java/swift. I'm not fully
convinced react-native is the (efficient and simple) way to go while I like
React a lot.

------
fbuilesv
It's interesting to see how they are overcoming some of the issues that large
projects experience when using GitHub. Their mention bot in particular
([https://github.com/facebook/mention-
bot](https://github.com/facebook/mention-bot)) looks like a very attractive
piece of software for teams using GH (open source or not).

------
k__
When trying it for Android it didn't feel like a help at all.

I still had to set up all this mobile dev environment boilerplate...

~~~
martinkonicek
Hey, I work on React Native. I'm curious what you meant by setting up the dev
environment boilerplate and how we could fix it. Was it the setup described
here? [http://facebook.github.io/react-native/docs/android-
setup.ht...](http://facebook.github.io/react-native/docs/android-setup.html)

~~~
k__
Seems like it still needs a huge chunk of Android-SDK and VM and stuff. I was
like "I'm doing React for a year now, lets try this on an afternoon", but then
I had some issues that didn't even had something to do with React Native that
prevented me from getting things running.

Well, maybe I'm too pampered from web-development, haha

------
kartickv
One concern I've heard about React Native a few times is that the UX is not at
par with real native apps. Does the React team understand why is so, and have
a plan for fixing this?

Or is React Native consciously intended as a tradeoff between UX and
development time?

------
hbhakhra
I hear lots of success stories with React Native but how come I don't see any
recognizable names in the list of apps built with React Native? One possible
explanation could be that the most popular apps can afford dedicated
iOS/Android teams or have been around longer than one year.

------
simpfai
I know Google's Flutter([https://flutter.io](https://flutter.io)) is still in
its infancy but can anyone comment on how it compares to React Native?

~~~
twreactistricky
At the very least I don't think Flutter is wrapping native UI components.
Flutter renders its own widgets written in Dart and using Skia as the
underlying graphics library. So it seems more like QML in that sense.

------
amelius
When will React support full CSS?

~~~
caltrain
Quick example why its not supported: Lets say you are building an instagram
style app. You need to render an image from network and won't tell the app its
vertical height(Just like you would do in a webapp)

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.

~~~
dbbk
What has that got to do with not supporting CSS?

------
sgslo
If you're interested in learning more about React Native, I have published one
of the most comprehensive and certainly highest reviewed tutorials here:
[https://www.udemy.com/reactnative/?couponCode=4HN](https://www.udemy.com/reactnative/?couponCode=4HN)

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).

