So we can use React Native to build production-ready native mobile applications that have all the features and some big companies like Facebook, Instagram, TaskRabbit, etc. are already using React native in their mobile apps.
React native is developed by Facebook for creating a native style for apps. In the initial phase, it was only developed to support the iOS platform. But in a recent update, Android support was also added. So now we can develop mobile UI for both platforms using React Native.
React also works separately from the main UI thread. And whenever the
state change, react-native updates all the views automatically. And all this can be done using the core UI libraries of the React platform. So it's totally free from HTML and CSS markup.
The main advantage is realized when we develop an application with react native. How easy it is to use and understand, because of its strong developer tools that come with less error and meaningful messages, is a great advantage.
It's also platform-independent. So whatever browser and tool you know or are familiar with, you can use it with React native. For example, Chrome, Safari, or Xcode, Android studio, etc.
The only risk or disadvantage is that in the terms of maturity, React native is still relatively new. Support for it was released in 2015 and the documentation needs slight improvements.
Some features of Android and iOS are still not supported in it and react native also uses its own layer so it's a little bit hard to debug the code in between react and host platform.
React native uses JSX, components, state, and props for creating basic building blocks for any application. So we need to understand these things in order to understand react native.
The component is a thing or building blocks that we use to add new features inside our code, like adding a new button, etc.
We use props to customize our components and this feature makes a single component to be reused in different places in our app or project. But props cannot change over time because they are read-only. And we can pass the props as a variable from their parent component to a child component.
The state allows a react component to change its output over time in response to a user action. Like we click on a button and its value is incremented by one. The states are the variables that cannot be passed as parameters but rather, components initialize and manages internally.
So this was the basic introduction to React native, in our next article we will cover some more basics of react native with examples.