Header Ads

ad728

React native tutorial for beginners

When the reaction was announced natively, the first reactions were more positive. Traditionally, when we think of web technology in the mobile space, things like Apache Cordova come to mind, which allow us to package websites or web applications as a mobile platform application. ۔ In this introductory tutorial, we will review React Native's architecture, the philosophy behind React Native and how it differs from other solutions in one place. At the end of the article, we will make a reactive "Hello World" application a reactive one.

Let's start by saying that React Local is a relatively new new technology. It has been officially available since March 2015, which was in private beta earlier this year, and was used internally on Facebook some time ago. The phrase "Rome was not made in a day" generally applies to technology as well. Tools like grunts and platforms like Node.It took years to mature. In the web world, things move faster, and with the many frames, packages, and tools that emerge every day, developers are a little more skeptical and feel every bass on the drum. Don't want them to end. In the situation of stopping the seller we will get into what makes React Native special, because it is a technology that is worth entering and we will cover some of the issues in which all unicorns And the archers are not.

Underground
When talking about web technologies on mobile devices, the available solutions generally fall into one of the following categories.

Grouping Web Applications in a Mobile Web Browser
A web application resides in a mobile browser, commonly referred to as a Web web view. Without a major refactoring, a website or web application works on a mobile device. We may need to consider mobile browser events, such as changing the orientation of the device for the full user experience and touching or touching the small screen, but we have a mobile version with minimal effort. works. Cardova / PhoneGap is the most popular option in this category. Unfortunately, this option has a major drawback: in some cases, applications made with Cordova are particularly slower than native applications, especially for heavy graphics applications. In other cases, the mobile operating system does not provide all the functions of the webview that are available in the mobile browser. The user experience may also be different from local applications. This may be due to the application itself or the platform itself. This problem may be different from the scroll bars that are not noticed unless you have a significant delay in touching the items.

Setting Up Local Technologies
One totally different solution is to create a native code base. This is done by converting the original source code into another programming language. We change the spatial performance for an abstract layer with some uncertainties. In the case of closed source solutions, we are not even sure what happens under the hood and what kind of black box we are dealing with. In other cases, we're not sure how much damage our code will cause when upgrading our next mobile operating system and when improvements or updates are available. A famous example of this category would be Hex.

Use of JavaScript Layer
Here, we use the JavaScript engine of the mobile environment and run our JavaScript there. Native control is assigned to JavaScript objects and functions, so when we call a function the phonics button right hair (), a button will appear on the screen. Knight Scripts or Applicator Titanium are well-known examples of this category.

The ancestral response can be classified as some of the third types. For iOS and Android versions React uses the native Javascript core, the default JavaScript engine in iOS. Apple's Safari browser also has a Javascript engine. Developers of OS X and iOS can interact with it directly if they want.

One major difference is that React Native runs JavaScript code in a separate thread, so the user interface is not blocked and the animations must be smooth and silky.

Reaction is an important feature
It is worth noting that "React" in React Native is not kept there by accident. For ancestral reactions, we need to understand what triggers a reaction. The following concepts work similarly in React and React Native, although this code example is designed to run in the browser.

Single rendering entry point
The first thing we do when we take a look at a common reaction element is

No comments

Post Bottom Ad

ad728