Guide to React Native

Get the 411 on React Native, the framework taking the dev world by storm.

May 21, 2020 | 9 min read time

Guide to React Native

React Native

React Native has quickly become one of the most popular frameworks for developers since it’s original release five years ago. The framework started as an internal hackathon project for Facebook in 2013 and was released to the open source world two years later. React Native enables developers to create cross-platform apps for iOS, Android, and Windows Mobile. It’s easy to learn and has a loyal, active community supporting it. We’ve compiled an ultimate guide to React Native and answered some common questions such as:

  • What’s the difference between ReactJS and React Native?
  • What is React Native used for?
  • How does React Native work
  • Why is React Native better than Angular?
  • What Apps use React Native?

We’ve also provided some great React Native examples of some of the top companies that have adopted React Native for their mobile apps. Keep reading to learn more about one of the most popular mobile app frameworks.

React Native Vs React

ReactJS has been around for almost a decade. It gained incredible popularity when leading brands like Instagram, Dropbox, and Netflix implemented it in 2015. The same year, React Native was released. However, with incredibly similar names, it’s left some developers wondering what the differences are between ReactJS and React Native.

Simply put, ReactJS is used to create web pages to be viewed in a web browser. Alternatively, React Native helps developers create mobile apps for Android, iOS, and Windows Mobile. You can compile these apps and put them in their respective app stores for users to download. While ReactJS uses web components as building blocks, React Native uses native components, hence the name.

Additionally, ReactJS initially provided developers with a JavaScript library, while React Native provides framework capabilities. Before the release of React Native, developers could make ReactJS into a framework by adding on the necessary components. However, React Native comes pre-loaded with everything you’ll need – and likely more. This means no more sifting through web packs and addons to morph ReactJS into a multifunctioning library and framework.

One of the great things about React Native is you can use as much, or as little, as you need. If you’re ready to get started on an intricate mobile app, or just need to make a simple HTML page more interactive, React Native makes it simple to get started. If you have yet to start a project with React Native, you’ll be pleasantly surprised at just how easy setting up and getting started is. With a single command line in your terminal, you’ll be ready to go. React Native’s site provides more information on JavaScript syntax transformers, polyfills, and everything you’ll need to start coding your first app.

What is React Native Used For, and How Does it Work?

Like we mentioned above, the most straightforward answer is that React Native is a framework used to create cross-platform mobile applications with JavaScript. React Native allows developers to create robust apps for iOS, Android, and Windows and even the web, more efficiently without reducing the application quality, or end-users’ experience. We won’t go in-depth into the inner workings of React Native in this article, but we’ll provide a surface level understanding.

So, how does React Native work? There are four quintessential threads in every app built with React Native:

  1. The UI Thread
  2. The JS Thread
  3. The Native Modules Thread
  4. The Render Thread

The UI thread, commonly referred to as the main thread, renders and displays native iOS and Android UI elements.

The JS thread is, you guessed it, the JavaScript thread. It handles your app’s business logic. For example, the JS thread makes API calls and processes touch events.

The native modules thread provides your app with access to platform API when needed.

Lastly, the render thread, which only Android L (5.0) uses, is used to generate OpenGL commands.

So, how do these four threads work together? Developers use the bridge to help interactions between UI and JS threads. Bridge works in one of the following ways:

  • Asynchronous: allows threads to communicate asynchronously, meaning processing can continue before another transmission finishes.
  • Serializable: When two different threads exchange serialized messages without operating or sharing data.
  • Batched: Optimizes communication between threads by exchanging messages in a block form.

Why is React Better than Angular

Angular and React both provide frameworks for developers to create mobile apps. Both have strong, loyal followings. It’s subjective which platform is better, but many strongly prefer React Native. If you’re wondering ‘why is React better than Angular,’ we’ve broken down a few basic similarities and differences.

Both React Native and Angular are open-source software developed by top tech companies, React by Facebook and Angular by Google. Initially, React JS was developed as a JavaScript library; however, since the release of React Native, it’s arguably also a framework. Alternatively, when Google developed Angular, it was created as a JavaScript framework.

Angular was created as an MVC Framework. Depending on personal opinion and your project, this could be a benefit or a drawback. The benefit of working with Angular is that it comes standard with a considerable amount of functionality. This means after downloading, you’ll be able to get to building your project much quicker. You won’t have to consider routing libraries or utilities for unit-testing components – it all comes standard. While this does mean you can get to coding faster, it also provides less flexibility. If you have strong opinions of libraries and other add ons, and they differ from what Angular forces you to use, Angular may not be for you.

Alternatively, React doesn’t come pre-loaded with many of these add ons. This means you’ll have a bit more set-up to do before jumping into your project. However, it also means you’ll be able to customize your MVC to your liking before getting started. The learning curve may be steeper, but it’ll produce an entire MVC framework that is personalized to your work style.

In addition to this, one of the most talked-about features of React is its use of Virtual DOM. We won’t go in-depth here, but mostly, Virtual DOM renders updates incredibly fast compared to the Regular DOM used by Angular. In addition to making React lighting-fast, Virtual DOM also improves UX.

What Apps Use React Native? Top React Native Examples.

Since it’s initial release in 2015, React Native has come a long way. From hot, new startups to Fortune 500 Companies, a wide range of industries and companies are building apps on React Native. We’ve compiled a list of a few great React Native examples below.

1. Facebook

Since ReactJS and React Native were initially created by Facebook developer Jordan Walke, it’s not surprising that Facebook has been one of the most significant supporters of React. While all the Facebook apps use React Native, the Facebook Ads Manager app was the first app built by Facebook exclusively on React Native. In fact, it was the first cross-platform app ever created with React Native. The Ad Manager app allows users to quickly and simply manage their Facebook ads with the intuitive user experience and an uncluttered interface. Since the ad manager, on both desktop and mobile, deals with an intricate amount of data, it was a natural fit for React Native.

Facebook Ad Manager was the first cross-platform app created with React Native. Photo from: https://www.androidauthority.com/facebook-apps-999160/

2. Instagram

Since Facebook owns Instagram, it doesn’t surprise that the mobile social media app is also using React Native. Two years after Facebook acquired the photo-sharing platform, the Instagram dev team began integrating React Native with the existing app to ship features faster to both iOS and Android versions. This was actually one of the first projects where developers started implementing React Native into an existing app.

Instagram was one of the first projects where developers implemented React Native into an existing app. Photo from: https://apps.apple.com/us/app/instagram/id389801252

3. Walmart

Currently, at the top of the Fortune 500 list, the retail giant Walmart started shifting its iOS and Android apps over React Native in 2018. The development team utilized code sharing between iOS and Android apps. In fact, 95% of the codebase is shared between the two operating systems. This helped the team implement changes across both apps more efficiently while reducing the time-to-market.

Transitioning its iOS and Android apps to React Native helped the Walmart Dev team implement changes across both apps more efficiently while reducing the time-to-market. Photo from: https://www.walmart.ca/en/mobileapp/online-shopping

4. UberEATS

While the main ridesharing app, Uber, isn’t powered with React Native, Uber Engineering decided to use React Native to power its newer app, UberEATS. Similar to the ridesharing app, UberEATS was an innovation in food delivery. It also allows Uber drivers to pick up food deliveries, facilitating communication between restaurants, drivers, and hungry people.

Uber’s most recent app, UberEATS utilizes React Native for a simple and clean food delivery service app on iOS and Android. Photo from: https://manchesterinklink.com/hungry-pedestrian-theres-an-app-for-that-uber-eats-launches-in-manchester/

5. Wix

Wix is a CMS and online website building tool that allows people and businesses to create websites with no knowledge of coding. The Wix app allows its more than 154 million users to create and manage their sites. Producing an app at this scale on React Native was estimated to be completed 3 times quicker than usual.

Wix built its mobile app on React Native, allowing its 154+ Million users to create and manage their websites on the go. Photo from https://www.wix.com/release/notes/article/fca6e939-d69e-4188-840f-29a911b3cfcc

6. Gyroscope

Gyroscope is a health and fitness app for iOS and Android that helps users achieve their wellness goals. From losing weight to increasing productivity, Gyroscope tracks your progress to help you achieve your goals. It collects data on your health and provides recommendations to help you live a healthy life.

With all the data collected and produced, this complex app was the perfect fit for React Native. The app seamlessly integrates with different software and hardware, like FitBand. Gyroscope’s dev team claims using React Native helped significantly speed up their development time and helped them produce an easy to use app helping users live their healthiest, best lives.

The Gyroscope Development team claims using React Native to build their app significantly sped up their development time and helped create a great user experience. Photo from https://gyrosco.pe/

Summary

React Native has come a long way since its open-source release half a decade ago. Many developers love the ease of use, the friendly, supportive community, and how quick it is to pick up once they’re familiar with JavaScript. The React Native framework has made creating cross-platform apps for iOS, Android, and Windows Mobile, more efficient and more straightforward than ever.

We hope you gained some valuable insights from our guide to React Native. Whether you’re developing an app for a hot tech startup or a Fortune 500 Company, don’t forget to pick up a free version of CloudApp. But, don’t take my word for it. Power users of CloudApp reported seeing upwards of 67 minutes in time saved per week while using its screen recorder, screen snipper, screenshot tool, and GIF editing tools. That’s almost 60 hours of work each year.

Over 3 million users have already tried CloudApp, including 53% of the Fortune 500. Get a demo or sign up for a free trial here and start saving time.