REACT NATIVE & Its Working Principle

Asif Ur Rahman
4 min readJan 17, 2022

--

Introduction

For several years now, React Native has been a hot topic in the mobile development world. No wonder — it took the tech world by storm by offering a way to develop mobile apps for both iOS and Android simultaneously !!!

The definition of React Native

React Native (also known as RN) is an open-source JavaScript-based mobile app framework that is used to develop mobile applications for iOS and Android with the same codebase simultaneously. It is a combination of the React framework and the native components of the Android and iOS platforms.

Biggest Advantage

The framework lets you create an application for various platforms by using the same codebase. This framework has made it possible to create native mobile apps for multiple platforms simultaneously. Like, we can develop full-blown mobile applications for both iOS and Android using a single language, i.e., JavaScript, which saves a lot of time.

First Release

React Native was first released by Facebook as an open-source project in 2015. In just a couple of years, it became one of the top solutions used for mobile development.

Why choose React Native?

Before using any framework we need to know why we will choose it, right? Yes, now we will know why we will use React Native for mobile applications.

1. Cross-Platform

Cross-platform means working in different platforms with the same codebase. And one of the most significant advantages of React Native is that you can develop an application for both Android and iOS ecosystems simultaneously by writing the same code with just a few modifications for each platform.

2. Javascript

There is no need to know the languages used for application development like Java or Kotlin. Because React Native uses only JavaScript, probably the most popular programming language right now, for the development of mobile applications.

3. Performance

React Native uses a similar code for both Android and Ios development that enables the speedy development of mobile applications. It also facilitates a hot reloading feature that makes sure that small changes done to the application are immediately visible to the developer.

4. Large Developers’ Community

React Native has a huge developers’ community that ensures that all the queries are resolved in time, and therefore, adequate support is available for the React Native framework.

5. It Keeps Getting Better

Day by day the community, as mentioned above, also keeps updating React Native with new functionalities and making sure that bugs do not occur.

6. Used by Many Companies

Though the framework is relatively new, many companies have already migrated the applications to this framework. It is used in some of the world’s leading mobile apps, including Instagram, Facebook, and Skype

7. Excellent Career Opportunities

React Native has become very popular lately due to advantages like cross-compatibility. Consequently, this popularity has led to high demand for React Native developers.

How Does React Native work?

let’s take a look at the mechanics of React Native. Don’t worry if you’re not a technical person — we’re going to explain this in layman terms.😀😀😀

XML

React Native is written with a mixture of JavaScript and JXL, a special markup code resemblant to XML that stands for eXtensible Markup Language. The framework has the ability to communicate with both realms — JavaScript-based threads and existent, native app threads.

How does this communication work?

React Native uses a so-called “bridge”. While JavaScript and Native threads are written in completely different languages, it’s the bridge feature that makes bidirectional communication possible. Here’s a great visualization of the bridge concept:

More on React Native Bridge

There are two sides to a React Native App. One is the Javascript side and another is the Native side. Where the native side is written by Objective-C/Swift for iOS or Java/Kotlin for Android. And the javascript side is written by javascript code. Where the React Native Bridge allows the native code and the javascript code to talk to each other. Although we write the React Native code on javascript, the RN Bridge converts it to the Native Language. Thus the react-native bridge works.

It is like a translator. Suppose you are an American and recently went to China to visit some historical places. But the problem is that you don’t know the Chinese language. That’s why you took a friend of yours who can speak both American and Chinese. As a result, your friend is translating the words of Chinese to you and hence you don’t face any communication problem between you and the Chinese. Here your friend is working as a React Native Bridge which converts one language to another.

Congratulations!

You have successfully completed this article. Here we have learned what is react native, the advantages of react native, and how to react-native works. In another article, we will dig deeper into the react-native framework and create our first application.
Asif Ur Rahman
Technical Course Writer at Programming Hero

--

--

Asif Ur Rahman

Hi ! I am Asif. A full time web developer. || Web Developer at OmniGo || MERN Stack Developer