Ask HN: Should we build apps with React Native now? - skyisblue
======
pattrn
I have had a production application live for almost a year that uses React
Native. It has been a pleasure to work with, and I would recommend using it.
So far zero crashes have been logged, no performance issues reported, and it
has quite a few active daily users.

Feel free to ask any questions! I'm happy to answer.

~~~
swah
Thanks! Here they go:

1) How much native code did you write?

2) Are you using native plugins? For what?

3) Are you being able to update RN versions?

4) Are you developing on a Mac / delivering on both platforms?

I've been hesitating because simple stuff like Charts has little options for
now. And because FUD.

~~~
pattrn
1) I did not write any native code.

2) I use quite a few plugins containing native code. Older versions of react-
native didn't handle this well, which required manually setting up linking for
Android and iOS. This was painful. Thankfully, they added the "react-native
link" command, which started doing this automatically. Since then, I haven't
had any issues.

3) Upgrades from early version were also painful. I gave up the first time I
tried, since the benefits didn't seem to outweigh the time it took to upgrade.
Once they improved the upgrade process, I bit the bullet and upgraded. Since
then, upgrades have worked flawlessly, so I've upgraded whenever they released
features that replaced third-party libraries.

4) I develop on a Mac, and I release the application on both Android and iOS.
Only one component differs between the two platforms: the header. I show a
"Back" button on iOS, whereas I disable it on Android since it's unnecessary.

Early on, I also found some discrepancies in styling. Text boxes, for
instance, showed default fonts on Android, while they showed my custom fonts
on iOS. They also included underlines, and tapping outside buttons with a
visible keyboard required tapping twice. These turned out to be bugs, and I
was able to hack around them pretty easily. I believe they have since been
fixed.

React Native definitely lacks a good charting solution, or at least it did
when I wrote one. I haven't checked since then, since my custom solution
solved my needs. It ended up working out well, since I was able to reuse my
charting library to generate SVG-based charts for the web dashboard. If
detailed charting is a requirement for an application, it will require some
effort to get working on React Native, but it's not an insurmountable task.

Overall, React Native definitely had some rough edges when I first released
the app, but they have fixed all of the issues that annoyed me. It has
improved significantly, and if I were to build another application, I would
use it again.

~~~
swah
Are you mixing npm and yarn? Or which do you use? Just hit a small problem
with npm.

~~~
pattrn
I use NPM on this project, and I haven't had any issues.

What problem did you run into with NPM?

~~~
swah
After installing react-navigation, react-native run-android stopped working :|

(But with yarn everything works so ok)

~~~
pattrn
When "run-android" fails to boot, I usually start by checking the device
simulator logs. If nothing shows up quickly, I switch to a different library.
I know that's a cop out, but I have very little patience for issues like that.
It has only happened once.

As far as that specific library goes, I haven't used it, so I can't really
give any better guidance. Sorry!

------
zn44
depends on what you want to build. In my experience it's great for simple
prototypes. I see more and more people using it for bigger projects. Also you
can always gradually move back to native if needed.

~~~
swah
Very good point - maybe even if FB even showed that, more people would use RN
and not even go back to native. So much FUD everywhere. The only FUD that
doesn't exist is "try to make two apps in Java and Swift and fail"

------
hkarthik
If you have entrenched native mobile programmers, they will likely resist
moving to React Native. It won't be worth the effort to convert an existing,
large native iOS or Android (or both) app to React Native.

However if you're just starting to move to mobile, React Native is the way to
go. For new projects, its definitely worth a look if you don't have a strong
dependency on the underlying native hardware.

------
aaronbrethorst
maybe.

~~~
roryisok
great answer

