Contact Us
Posted by Livio Bieri Wednesday, November, 30th. 2016

We believe in React Native

While React has been around for a while now and can be considered stable, React Native is quite the opposite. Find out why!

A while ago we made the decision to rebuild our mobile App with a new technology called React Native. As we are now getting closer to the release of our new iOS application we thought it is a good time to look back on our experience with React Native.

React Native1)React Native was released in March 2015 – React Blog, Facebook Blog is a framework created by Facebook to build mobile Apps with React2)React was releases in May 2013 – Facebook Project Page for React (which is a JavaScript library also created by Facebook). React Native is basically Facebook’s approach to simplify and speed up the development of mobile applications.

Generally, there has been a huge hype around React and React Native. Both are available for everybody as open source projects and both brought new concepts to the table which have changed how we think about Web- and Mobile- Development respectively. While React has been around for a while now and can be considered stable, React Native is quite the opposite:

React Native was released a year and a half ago and far from being stable. When we started using it in late 2015, it was terribly incomplete. Support for the most basic functionalities was lacking and we were fighting with performance and layout issues. Seeing how most of this got resolved over time, strengthened our belief that it was a great decision to use React Native and we are confident about its future.

To give you a better understanding why we feel so strongly about React Native we will go into more details below and try to point out the good as well as the bad parts we encountered.

The great parts about React Native

Developer Experience

First of all, it must be said that working with React Native is fun! Everyone who has ever done some kind of native development knows that waiting for your code to compile and wait for the restart of your app sucks. With React Native you can simply reload your app without the need to recompile your code. This is huge. Tiny changes don’t take forever anymore, they are just one reload. You can even use hot reloading to inject new versions of files at runtime which is even better.

React Native is based on JavaScript and its own styling language which highly resembles common CSS. This makes the transition from traditional web development extremely easy. Even using existing JavaScript library is no problem. The usually challenging task of layouting mobile Apps feels easy and natural with the web-like approach of React Native (which is based on a flexbox implementation).

Tooling in general is great. Debugging is straightforward, you simply attach to your Chrome browser and use its awesome debugger and profiling tools. React Native also made it much easier to reason about the code as it basically makes the app view layer a pure output of state.

Truly Native and reusable

Before starting with React Native we were developing our app with jQuery and Cordova. Given this setup it was tedious to get any kind of native look and feel. The little things such as navigation and scroll behaviour never quite felt right and it created a frustrating experience for our users. React Native on the other hand renders native platform views. For example a <View /> component becomes a UIView on iOS or the native View element of Android. This makes it incredibly easy to even reuse layout code on Android.

Deployment

Up until recently the Apple review times have been up to a few weeks. Even though it isn’t a part of React Native itself, using CodePush (a cloud service by Microsoft) allows us to push updates without going through the App Store review process at all. This means that we can push updates silently to our customers without any prompts. On one hand it allows use to deploy new features very frequently without waiting for approval by Apple and on the other hand it feels great to be able to push a bug fix really fast if something went wrong. The maintainers of the project are also highly responsive and offer help when something does not work as expected.

Where it can (still) improve

Upgrading

React Native moves fast. There is a new release every second week. The bi-weekly release cycle is a double-edged sword. It is great, that every second week there are major features and bug fixes available. But especially in the beginning, we spent a lot of time upgrading. Since React Native got a lot more stable over the last few months we did not feel the need to upgrade to every release. We started to simply periodically upgrade when we knew we would need a particular feature or when we were having issues that would be fixed in a newer version. So our problem of a time consuming upgrade process is already about to become less relevant.

Native Modules

Native functionalities that are not part of React Native can be extended by so called native modules. While we are grateful for their existence, we also realised that quality, stability as well as documentation vary widely. Some projects simply made our app crash after a minor release of their package. We contributed to a handful of projects that broke our app after such events. Since then we try to keep the usage of native modules from third parties to the minimum necessary.

Documentation

Overall the documentation is pretty good and got certainly a lot better over time. Commonly used features are documented quite well, but sometimes we encountered situations where the documentation was lacking and the only way to understand how something works was to read the source. While the community is super helpful we had a few instances where we spent a lot of time reading sources, googling and asking on Discord (the preferred channel of communication in the React Native Community).

Summary

Overall, React Native brings our mobile app development to a new level. It has its ups and downs but is steadily improving over time. We can not recommend it enough. It has been a great journey and we are happy to share our learnings and our enthusiasm with you. Feel free to get in touch if you would like to talk about it more.

About Fashwell, a visual search provider

Fashwell is a deep learning startup with a focus on fashion from Zurich, Switzerland. Our vision is to merge fashion content with commerce and to make every image on the web shoppable. Our team combines two seemingly contrasting fields of expertise, technology and fashion.

We are always looking for talented engineers, business developers, and other roles to join our team. Check out our career page for openings and have a look at our product.

You can also get in touch with me directly on twitter at @livioso.

References   [ + ]

1. React Native was released in March 2015 – React Blog, Facebook Blog
2. React was releases in May 2013 – Facebook Project Page for React
Previous article in Fashwell blog Next article in Fashwell blog