This tutorial will guide you through every step and provide resources where you can learn more.
The tutorial takes you through the process of building an Android app for searching UK property listings:ĭon’t worry if you’ve never written any JavaScript or used the CSS-like properties you’ll see. You can also check out our tutorial focused on React Native for iOS. While you can write React Native apps for iOS and Android, this tutorial only covers Android. The community has even added tools such as Expo and Create React Native App to help you quickly build React Native apps without having to touch Xcode or Android Studio! The goal is to learn-once (the React way) and write-anywhere.
It’s goal isn’t to write the code once and run it on any platform. React Native brings the React paradigm to mobile app development. Your UI is simply a function of the current app state.
On the other hand, React Native puts all logic, view, style, and state in one javascript file.įor example, var Error = React.In this React Native tutorial you’ll learn how to build native apps based on the hugely popular React JavaScript library. If there are many state changes in the view, the code gets more complicated. Although Butterknife library made it simpler to bind Android views, it is still quite hard to see how the component will look like as a whole. When I was developing with Android Studio, I had difficult time going back and forth xml and java files. But in React-Flux structure this confusion is solved since all data in the view must go through the flux store. When I was developing in Android, the use of cache was necessary, and each view had to decide whether it had to pull data from the cache or from the plain java object. To learn more check the official React website and/or talks from React Conference. Since this is very obvious for people who are familiar with React & Flux architecture, I will not discuss in detail. The virtual DOM with Flux makes it so much easier to handle changes of data and each component. The magic of React is that it deals all changes with state changes. React makes the application into a state-based machine. You can see that a lot of layouts are rendered almost identically! What’s so good about it? 1. Here are some running video of the app on both platforms. Unfortunately, since our app was rejected by the App Store, it is only published on the Android Play Store. Does it actually work well?Īfter 4 months of development, our team succeeded in developing a well running app with same features with one codebase on both Android and iOS platform. After working on React Native for 4 months, I strongly believe that React Native will be a game changer for mobile development. The choice was inevitable, since, due to the nature of the idea (peer-2-peer foreign currency exchange), we needed the app to run on both platforms, and we did not have enough resource to build two apps. Long Hoang, my teammate, and I have decided to build the prototype of our startup idea, Plain Exchange, with React Native. Check out this keynote on React.js Conf 2015 to understand more about this. However, React Native is different from any other javascript-powered mobile framework, because it scripts javascript directly to the native layer, rather than adding another layer. That is when I started looking at React Native - a Facebook initiated open-source framework “for building native apps using React.js.”Īt first, I was skeptical about the whole thing, because I saw many unsteady and lagging hybrid apps. Sometimes 2-week-worth of codes on Android ended up being trashed, because these codes were decided by the team to be implemented during the Android team were waiting for the iOS to catch up (iOS were delayed by the lack of developers and inefficient App Store Review process). When I wanted to create my own mobile product, I had to have my “significant other” to have the iPhone users to be on board with the product, and some ideas are difficult to test properly without embracing both platforms.Įven when I was working in a startup that was operating an app with 1.5M downloads, I witnessed that the inconsistency of Android and iOS development slowed down the whole development process not in terms of 2x, but 4x. When I was doing mobile development with Android, iOS seemed like the other side of the world, just as being a South Korean never imagining crossing the border to the north.