React-Native is a JavaScript framework that makes application development activities by front-end developers more practical.
One of the keys to creating time-saving applications depends on the front-end framework used.
With a handy framework, you can build applications without wasting resources and energy.
Unlike other frameworks, React Native is cross-platform. This means that you can create applications for multiple platforms at once. That lives up to React Native’s promise: Learn once and write anywhere.
But what exactly is React Native and what is its main function? Read the article below to the end.
What is React-Native?
React-Native is a framework used to create mobile apps on two operating systems at once, namely Android and iOS. For this reason, React Native is also called a cross-platform network because you can create one application that can be used on various platforms, namely Android and iOS.
In building an app, you need to learn a programming language that is specific or specific (also known as ‘Native’) for that platform. This is because each operating system has a different programming language.
To create applications on Android, you need to learn the Java programming language. Meanwhile, to create applications on iOS, you need to learn to use the Objective C or Swift programming languages. But by using React Native as a framework, you no longer need to do that specific thing.
Instead of using Java or Objective C or Swift, you only need to learn the Javascript programming language to be able to create applications using this platform. Javascript itself is commonly used by developers in creating websites.
So, using this platform, you only need to create one application. You no longer need to create multiple versions of applications that are compatible with the existing operating system.
Understand This Before Learning React-Native
Before learning to use React Native, you should have the following basic knowledge:
- HTML. Markup language to structure web pages.
- CSS. Style sheet language for designing the appearance of the website.
- Basic JavaScript. The programming language that makes interactive websites and their features work.
- ECMAScript 6 (ES6). Modern versions of JavaScript that bring new features (modules, arrow functions, classes, etc.).
- JavaScript XML (JSX). Additional JavaScript that allows developers to adapt HTML in React.
- react. A JavaScript library for building the User Interface (UI) of a website or web application. React Native uses the React environment in app development.
How React-Native Works
As explained above, react-native is a framework written in a mixed language between Javascript and JXL, a special markup code that resembles XML.
This framework is capable of communicating with two domains at once, namely threads based on Javascript and threads from native apps. Then, how to communicate it?
Well, react native uses a bridge.
Javascript and native threads are written in 2 different languages. However, the bridging feature of react-native allows this framework for two-way communication. Which means, that when a developer already has an app whether it’s based on Android or iOS, they can still use its components while using React Native.
The Advantages
- Ease from the Technical Side
First, the strength of react native is that the program development process is easy to learn and implement. Today there are lots of tutorials or online courses to learn React Native.
- Applications Can Run Faster
Many states that Javascript will not make applications run faster when using native code. However, this assumption was successfully dismissed when an experiment was conducted.
In the experiment, it was found that the performance of applications using native code and react-native had the same results.
So in addition to its ease of code generation, react-native can also affect the running speed of an app.
- Not Require Large Resources
You simply use a variety of existing templates, you only need to take advantage of them. Then you will see the results immediately.
- Save Cost
This is the reason why many startup companies love React Native. When developing with React Native, of course, companies don’t have to pay two teams to work on Android and iOS separately.
- Has a Large Developer Community
React Native is a framework that has been widely used by large companies, such as Facebook, Instagram, Tesla, and Walmart.
The Disadvantages
- Very Fast Developing JavaScript
JavaScript is a weakness of React Native because it evolves so fast that in effect some things can’t be done as expected.
- Skeleton
Just like JavaScript, the React Native framework is also a weakness in itself because changes occur so quickly.
- Platforms
As we know, to be able to develop iOS-based mobile applications, developers must also use MAC OS devices because this operating system is exclusively only available on Mac, so at least you have to provide a Macbook.
- Performance
Humans will never be satisfied with the performance, so it still has something to do with React Native performance in general among developers. Well, for those of you who have less opinion, this is certainly a negative point about the shortcomings of React Native.
How to Learn React-Native for Beginners
- Perform NodeJS Installation
First, install NodeJS which is the runtime to run Javascript. Where all Javascript programs that are outside the browser will be used.
- Installing NPM or Yarn
Install NPM or Yarn as a NodeJS project maintainer. The NPM installation process will be done automatically when you have NodeJS installed. Meanwhile, you have to install Yarn manually.
- JDK
Third, you need to prepare the Java Development Kit. The goal is to compile an application or software into an APK.
- Using Android SDK
Lastly, the Software Development Kit. If you have successfully downloaded and installed it, then you will have the Android directory on your Home menu.