Ask HN: Companies who adopted React Native over a year ago, do you regret it?
363 points| tekstar | 8 years ago
I run a mobile team of ~30 folks. In 2015 we experimented with RN for 3 months before deciding that it was not a good fit for us. I'm interested in stories from the alternate reality where we took the react-native path instead.
I'm NOT particularly interested in stories about single devs making prototypes for a weekend. React Native has a delightful experience for this use-case, but it does not directly transfer to being a good experience for a larger team with serious product goals.
Thanks
[+] [-] dan_manges|8 years ago|reply
Our iOS app: https://itunes.apple.com/us/app/root-car-insurance/id1021256...
Our Android app: https://play.google.com/store/apps/details?id=com.joinroot.r...
[+] [-] snarfy|8 years ago|reply
How's the battery usage of your RN app vs a real native app? Does your app require the latest phone hardware to run with decent performance?
[+] [-] g00gler|8 years ago|reply
I started building a react native app but decided against it because switching activities seemed to be very hacky compared to native development. Seemed like it'd really get out of hand with 10+ screens.
Wix's "React Native Navigation" was too opinionated / inflexible.
[+] [-] andrethegiant|8 years ago|reply
[+] [-] whostolemyhat|8 years ago|reply
Our version of React Native is quite far behind which makes using libraries not already in the project difficult: you have to track back through versions to find a compatible version, which then may not be doing what you want since it's an older version.
We're also having trouble upgrading the version of React Native due to versions having breaking changes. I know it's technically still not v1.0, but in reality a lot of companies are using it so having a stable version would be nice. Since it's unstable, many libraries haven't updated to compensate so you run into the same problem as above, tracking down precise versions of dependencies which also still do what you want.
The build process feels pretty rickety and seems to rely on a lot of global state - I spent a while checking how we could update dependencies, but when I rolled back to a stable version I was unable to build even after re-installing node modules etc. I was only able to fix it after opening Xcode, removing all pod libraries and re-adding them; I have no idea why that worked, and there are very few clues on Github or Stack Overflow as to what specific errors mean. Fixing my build step took the best part of a day.
Overall, for a small app like ours, we're just spending far too long on non-development overhead, like fixing build systems or checking dependency versions, and will probably move to native versions at some point in the future. It may be a pain maintaining two separate versions, but we'll have solid integrations with payment gateways and lots of documentation and info on Github/SO for problems.
I like React and the idea of React Native, but at the moment it just feels far too unstable and unpolished to use. I'd like to use it in the future, but probably not until it's had a major version release.
[+] [-] woah|8 years ago|reply
[+] [-] antoniuschan99|8 years ago|reply
[+] [-] lilactown|8 years ago|reply
Overall, I would call it a great success; we have four apps (2 iOS and 2 Android) built from the same codebase, soon to be 5, and React Native has allowed us to be incredibly nimble in developing the framework and features for them.
Some things I do regret:
1. We didn't go all in on React Native, keeping large portions of code in native in case of performance or security needs.
This means that any given feature requires iOS, Android and React Native development. All of us are now fluent enough in each to do the work, but the context switching and debugging of actions moving across the bridge are a velocity killer.
2. We didn't realize that RN's cross-platform integrations testing story was so poor; we thought that we'd "just use Appium, it's perfect." Nope - design decisions made by the React Native team actually make Appium unusable for our Android apps.
This has forced a lot of churn in our testing strategy and we still have a lot of manual testing at this point. This is, IMO, the #1 thing that should be focused on either by Facebook or the React Native community.
[+] [-] EngVagabond|8 years ago|reply
[+] [-] gcb0|8 years ago|reply
[+] [-] erik_landerholm|8 years ago|reply
We also built a component/style library that allows us to make responsive designs into web and mobile apps quickly and easily. Gluestick also allows easy creation of native apps (native/react native/web views) with 90+% code sharing. We also added a bunch of features (regex based routing, etc) to help with seo. We do all of this from our single framework based on react.
We had a lot of front end 'frameworks' in use and no consistency. Now we do. It's been a lot of work, but for us totally worth it.
We also have done a bunch of optimizations to make react fast, including how we handle webviews in a react native/native app. It's seamless. I'd like to link a video, but proprietary work that isn't done...blah blah blah, company secrets, blah blah blah. We will be releasing another blog post, detailing all the native enhancements soon.
[+] [-] btown|8 years ago|reply
[+] [-] lewisl9029|8 years ago|reply
[+] [-] morenoh149|8 years ago|reply
[+] [-] t1amat|8 years ago|reply
The two pain points have been 3rd party native modules and platform upgrades but both situations have improved greatly in the last year. Both the platform and the major 3rd party native modules have stabilized a lot, and platform upgrades are pretty easy via the react-native-git-upgrade tool.
I've used React Native with a number of languages: JavaScript, JavaScript + Flow, TypeScript and ClojureScript. All of the above, and soon, if not already, ReasonML, are viable language choices. My personal preference is TypeScript and ClojureScript.
The projects I have worked on professionally tend to be highly company branded with a common UI, and I am able to share ~100% of the JavaScript code-base between them (ignoring platform entry points).
An anecdote: recently one of the applications (React Native + TypeScript) was audited by a respected independent security consulting firm to rave reviews by the security team. On the spectrum of risk (Info, Low, Medium, High, Critical) the worst reported issue was a Medium that was due to the platform default ProGuard setting that disabled binary obfuscation for development; enabling required a 1 line config change.
[+] [-] htormey|8 years ago|reply
Also, upgrading native dependencies in React Native is a really big pain point. The quality of Native modules also varies enormously.
An example react-native-camera:
https://github.com/lwansbrough/react-native-camera
Works well on iOS but has all sorts of performance problems on Android devices. Even newer ones.
One question I have is why did you prefer Typescript over flow? I have just started using the latter and I would be curious to hear your thoughts on the matter.
I'd also love to hear why ReasonML is good.
[+] [-] wiradikusuma|8 years ago|reply
These days, those things I listed are arguably pretty standard for modern apps.
[+] [-] frostik|8 years ago|reply
Infinite Scrolling: ListViews and RN are a thing. There's a new List Type since a few Versions - if you're following the book regarding DataStrucure everything should work.
REST Client: RN provides basic API so nearly everything which works in Browser works in RN too. I use Redux Sagas and fetch. Working great so far.
Image Handling: It's built on top of fresco and works great so far.
Push: Can't say mush about it, because i don't use it but should work ok.
In-App: There's a great Plugin.
Animation: Native Animations are around for some time. Should work ok, but depends what you're planning to do.
Basically it's extremely easy to go native if necessary. But at that point you need to implement it on every platform. Even though for usual use cases it shouldn't be necessary. You just need to keep Track of your renderings and make sure you use PureComponents at the right point, so there are no unnecessary rerenders congesting the bridge and slowing everything down. But if you do it right you will achieve performance and an feature level that is on par with every native development in less time. And with 95% Code Share.
[+] [-] dean177|8 years ago|reply
I had a fair amount of trouble with push notifications on android (callbacks not being called etc), but those issues were eventually resolved (and had no issues with iOS).
Everything else on your list I found much simpler &a quicker than working with the native platforms
[+] [-] ashark|8 years ago|reply
That's a... big mobile team. RN's been a good move for our smaller 2-3 person teams (2-3 devs, plus part-time designer, QA, various other roles full or part time—call it 6 personnel) though not without trade-offs. Big wins:
1) JS devs can contribute quickly and comfortably.
2) Can still easily write native code if needed (win over other native-but-not-native frameworks)
3) If you decouple business logic (Redux, even) and, say, REST client code, that stuff's largely portable to an awful lot of platforms. RN's supported platforms (including kind-of supported, like FireTV and Apple TV), plus desktop (well, "desktop"—Electron) and (depending on what you're doing) web.
4) It actually does look pretty OK on both iOS and Android with few special considerations (conditionally rendered sections, different views) for each. This surprised the hell out of me.
5) Papers over a lot of stupid, badly-designed, and/or broken crap on Android, and does a decent job of it.
These add up to a ton of time saved, which manages to overcome:
1) Immature, kinda poorly managed ecosystem. If you stray from RN+Redux and one or two other core libs, Here Be Dragons. Like, good luck ever upgrading RN if you load up on dependencies like a typical JS project, if those dependencies touch RN itself at all. Part of this is just JS "culture", part of it's the relative youth of the project, and part of it's FB's choices.
2) It's Javascript. We've fixed this by using Typescript, which is great. Makes Redux actually manageable—way less bouncing around between files, bouncing out to documentation, more just writing code. Fewer red screens due to typos or related dumb mistakes.
I can see, though, how it'd be challenging to divvy up work efficiently on even a fairly large mobile app for 30 people (are they all devs?!) unless you've got a lot more going on than just layout/CRUD/client-server, in which case I'd think RN wouldn't change things much, as far as division of labor goes.
[+] [-] mikesurowiec|8 years ago|reply
Pros
- We haven't done performance tuning and haven't had any user complaints about performance (it's a multi-channel chat app)
- Most of the time, changes "just work" on both platforms
- Javascript :D
- Development velocity is great, especially w/ UI changes
Cons
- Wish we had better text input control
- You still need someone who knows about native app development on each platform
- Upgrading versions can cause breaking issues (this has gotten better)
- Lesser used 3rd-party packages are often incomplete across platform, so a fair amount of patches
- Changes on one platform have the potential to break the other platform (so testing can require a lot of back and forth)
edit: formatting halp
[+] [-] susi9999|8 years ago|reply
The main issue is infinite scrolling by scrolling upward.
The user scrolls to the top, we make a note of the current top comment, load the next set of results, add them to the page.
At this point, the scrollbar is still at the top, so we need to manually scroll down to the previous top comment.
It can be a little jumpy. It certainly isn't smooth like WhatsApp etc.
Does RN have a list view that deals with this issue out of the box?
[+] [-] rimliu|8 years ago|reply
[+] [-] s73ver_|8 years ago|reply
[+] [-] todd3834|8 years ago|reply
[+] [-] Rumudiez|8 years ago|reply
I don't think it's likely there will ever be a true "one language to rule them all" in the foreseeable future. Gripe as you may about a tool you don't use, it doesn't sound like you're in a field where knowing JS is mandatory knowledge.
[+] [-] wwweston|8 years ago|reply
Any language with as critical a mass among devs will probably see tools to help people leverage it across different environments, so JS will likely continue to move into and live in all sorts of niches. But it's quite avoidable on the server, desktop, native mobile, embedded, and it's even becoming partially avoidable on the web.
You're safe enough that you don't have to make everyone else dislike it in order to not have to touch it.
[+] [-] unknown|8 years ago|reply
[deleted]
[+] [-] GiantRobots|8 years ago|reply
[+] [-] cnp|8 years ago|reply
[+] [-] awinter-py|8 years ago|reply
I spent a lot of time debugging RN. The instant reload feature comes with hangups. Tracebacks don't always appear.
Navigation isn't cross-platform.
Interacting with native APIs is nightmarish. JS wasn't built for java interop.
[+] [-] archgrove|8 years ago|reply
- With a little effort, it genuinely feels native.
- The talent pool is much larger. We didn't hire React Native folk, just good JS people who picked it up quickly.
- Blending native code with JavaScript is easy.
- There are methods to perform app updates without going through the app store release processes of either platform (and waiting for end users to actually download the update).
- It moves quickly, so bugs are squashed pretty quickly, and features arrive at a fast clip.
There have been challenges:
- It moves quickly. Backwards compatibility is doesn't seem to be high on the maintainers priority list, so almost every update will break _something_. We instituted policies of never falling far behind the public release (to avoid needing huge changes at once), and using very few external components (which are often not kept up-to-date with RN).
- If your use cases are outside of the maintainers, there will be problems. The release process seems to be "Does it work for the contributors projects? Ship it". Things like Pod based builds broke for months because they just weren't tested.
- The JavaScript ecosystem is still insane. Our project has ended up with one of the most complex build processes I've worked with (and I've worked with autotools).
My key advice would be:
- Stick with their release cycle, and follow their processes. Don't colour outside the lines, or you will have pain.
- Don't include third party modules unless you have _no other choice_.
- Test on both iOS and Android regularly (i.e. continuously). Things that work well on one platform may be broken on the other.
Based on our outcomes, present me would happily tell past me I'm making a good call, as I'm confident we'd otherwise never have shipped two native-feel applications with 5 developers.
[+] [-] alloy|8 years ago|reply
I think there’s no binary answer to whether or not React Native is a viable option. I can definitely imagine a bunch of situations where that would not be the case, but in our case the app is largely just a collection of views that show remote JSON data. Some small animations are done using the React Native animations API, but e.g. our navigation completely relies on native APIs and also has custom native transitions.
In short, I think that the companies that will succeed with RN are those that have native experience and a can-do-self attitude, both to ensure proper platform UX and deal with lower-level details such as RN bugs and limitations that would prohibit the product design from being possible to implement at all (for instance, in our case nested scrollviews); or those that are willing to sacrifice on UX and product design. (Not making any judgements here btw.)
We’ve written a bunch about our experiences https://artsy.github.io/series/react-native-at-artsy/ and I recently spoke about our specific case of integrating RN into our existing native app at React Native EU https://github.com/alloy/react-native-eu.
[+] [-] syaau|8 years ago|reply
iOS app: https://itunes.apple.com/us/app/marriage-card-game/id1161818...
Android app: https://play.google.com/store/apps/details?id=com.bhoos.marr...
Note: It was our very first attempt on mobile gaming. The rules for the games are available here if anybody is interested to learn https://www.pagat.com/rummy/marriage.html The game is meant for players who already know the game rules.
[+] [-] chrisa|8 years ago|reply
There have been a lot of changes since 2015 - and the overall experience has gotten quite a bit better. There are many more modules available for both platforms (in 2015 you probably found a lot of modules only supported iOS and not Android) - and in general the whole ecosystem is more stable.
That said: not everything is perfect. React Native moves quickly, so there are sometimes frustrating bugs (especially in new releases) that can take a bit of time to resolve. Also, it's not a great fit for every type of app. 3D games are an obvious example of when you'd want to go native (or use unity).
However, after having done native iOS development and react native development, I can say that react native is still faster (development speed). In practice I find that I can reuse 95% of the code between iOS and Android, so it's been a great win for the teams I've been on.
[+] [-] mbrock|8 years ago|reply
[+] [-] anon12051|8 years ago|reply
stuck with old version of rn, upgrades break app
new team members onboarding takes forever, environment is extremely tenuous
would i use again? no
[+] [-] djstein|8 years ago|reply
so you have problems you need to sort out with your own codebase. this is not unusual when using any framework. willing to bet this also stems from poor code practices due to the lack of react 'standards' 1.5 years ago / lack of es6+ code
>new team members onboarding takes forever, environment is extremely tenuous
in terms of onbaording, this is something that can always be improved on. better docs. getting started docs. if you've done it once and realized what new hires are struggling with you can reduce that in the future. the environment isn't really that bad, if you had someone who understands javascript ecosystem then they really only need to know how to bundle the packages through the device specific IDE.
just seems like you've got a bad taste in your mouth for a standard everyone else seems to have figured out.
[+] [-] m_ke|8 years ago|reply
Users seem pretty happy with the product as well, we've had no complaints about performance aside from a barcode scanning issue on older android devices.
https://itunes.apple.com/us/app/bitesnap-photo-food-journal/...
https://play.google.com/store/apps/details?id=ai.bite.biteap...
[+] [-] solidr53|8 years ago|reply
Does seem like non native, but performs well ;)
[+] [-] lap42|8 years ago|reply
[+] [-] dkdkang|8 years ago|reply
I'm part of a JavaScript-only consultancy, we've now built RN apps for three companies in the Fortune 500: a retail, healthcare, and data storage company. Performance-wise, all three applications performed to our clients' standards. However, we also encountered issues concerning debugging, new releases, and other limitations.
That being said, the biggest advantage the RN has (which is why our clients decided to take the plunge) is that it significantly decreases the development time when you want to scale for various platforms. At the end of the day - your decision should be based on you and your team's willingness to play with JavaScript.
[+] [-] simonw|8 years ago|reply
[+] [-] htormey|8 years ago|reply
https://www.youtube.com/watch?v=cZ4zQWgajBg&t=746s
The main reasons I got into React Native was a combination of frustration with the state of Swift last WWDC and an opportunity to try it out with a client who just had a React Web team.
I don't regret the decision at all. If you are thinking about using React Native in a project here are some things to consider:
Maybe we should use React Native:
- We know JS / React
- We have lots of web developers but few mobile
- Our design is brand-focused
- We're willing to invest in RN
- We want to get into OSS
- We want OTA code updates
Or maybe we shouldn't:
- We don't know JS / React
- We already have an iOS team and an Android team
- Our designs are heavily platform-specific
- We don't have the time or money for an RN team / OSS
Pros:
- Cross-platform
- Performant, native feel (with some effort)
- Great developer experience
- Push updates over-the-air
- Strong community
- Backed by Facebook
Cons:
- Early
- Unstable (bugs, APIs)
- Ecosystem not fully developed
- Polished apps are high effort
- You may need native code (so JS + Obj-C + Java)
If you are a fully native shop, with no JS dev's that use React, it doesn't make all that much sense to rewrite your app using React Native.
If you have no native team, are familiar with React, then React Native makes a lot of sense.
If you are are a company with native apps and a web team that knows React then using React Native inside your existing app for growth, etc, makes a lot of sense.
Going all in on React Native is a big investment and I wouldn't recommend it for many use cases (multimedia, etc). Right now it definitely has some rough edges (navigation, upgrading versions, etc) but it can dramatically increase the productivity of your front end teams.