After the launch of React, developers started complaining that the library uses too much RAM as it uses the concept of a Virtual DOM. Mark Zuckerberg later stated that stated saying “We have made a big mistake including too much HTML 5 as compared to Native”. This really frustrated the developers as there was less native feel to the applications that they build using React.

React Native

Facebook started focusing on bringing a more native feel to react based applications and therefore Jordan Walkie figured out bringing iOS based UI elements to JavaScript thread. They created a prototype and launched a full version of React Native in a conference in 2015. Facebook also explained that their Advertisement Managing application, as well as Group application, were based on React Native.

How does it work?

React Native works in a similar way. The main difference is that instead of manipulating the DOM via creating a virtual DOM it communicates directly with the native views of the platform. A background process is run on the device which then communicates with the views via batched, serialize and asynchronous bridge. Thus React Native doesn’t rely on HTML 5 anymore rather it relies on native SDKs and JavaScript.

Main Features

React native is based on three main features. The React, native components, and platform. It uses react framework to build mobile applications purely coded in javascript. Then it uses native components with the help of Javascript to give the app a more native feel. And this is how it supports both Android and iOS platforms.

The only limitation, however, is that if you wish to have more native functionality which this library does not offers, you will have write platform specific code yourself.

React State and Props

Each data inside React Native is managed by State and Props. This means that the data is either mutable in the future (state) or immutable (prop). Props are short for properties. these decide how the components should community to each other. Props flow from upward to downwards direction that is from parent to child.

As components do not have state and they are referred to as stateless, this is where state kicks in. Props do not power the components to change in later development. A component having a state is stateful. This means a track is being kept for the components whenever a render does some changes in it.

React Native really empowers next generation of mobile applications. Giving what React could not provide. It surely shows how important JavaScript is going to be in the future of application development.