Docsity

ReactNative explanation, Exams of Javascript programming

Partial preview of the text

Download ReactNative explanation and more Exams Javascript programming in PDF only on Docsity!

React Native

Founded by : Facebook and

Community

React Native is an open source framework developed by Facebook that allows JavaScript developers to create familiar

React components that work across web, Android , and iOS development environments Logo Of React Native

In 2012 Mark Zuckerberg commented The biggest mistake we made as a company was betting too much on HTML as opposed to native.Using HTML5 for Facebook's mobile version resulted in an unstable application that retrieved data slowly.He promised

technical talk, Christopher Chedeau explained that Facebook was already using React Native in production for their Group App and their Ads Manager App

What is React Native?

-React Native is an open source framework that enables cross-platform mobile application building using JavaScript and React which is an open source JavaScript library developed by Facebook.

-Instagram, and other developers to build user interfaces.

-React Native apps function the same way as native iOS (built using Swift or Objective- C) and Android apps (developed using Kotlin or Java). React Native is a powerful tool that aids in creating apps with beautiful UIs, which are the same as native apps. As a

result, mobile app creation becomes easy and efficient, in terms of both time and cost.

Implementation -The working principles of React Native are virtually identical to React except that React Native does not manipulate the DOM via the Virtual DOM. It runs in a background process (which interprets the JavaScript written by the developers) directly on the end-device and communicates with the native platform via serialized data over an asynchronous and batched bridge.

-React components wrap existing native code and interact with native APIs via React’s declarative UI paradigm and

const HelloWorldApp = () => Hello world!;

export default HelloWorldApp;

AppRegistry.registerComponent('HelloWorl d', () => HelloWorldApp);

// The React native code can also be imported from another component with the following code:

import HelloWorldApp from './HelloWorldApp';

output:

HelloWorld

Native Development For Everyone

React Native lets you create truly native apps and doesn't compromise your users' experiences. It provides a core set of platform agnostic native components like View, Text, and Image that map directly to the platform’s native UI building blocks.

Seamless Cross-Platform

it is components wrap existing native code and interact with native APIs via React’s declarative UI paradigm and JavaScript. This enables native app development for whole new teams of developers, and can let existing native teams work much faster.

Talks

Members of the React Native team frequently speak at various conferences.

You can follow the latest news from the React Native team on Twitter

Core Components and APIs

React Native provides a number of built-in Core Components ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen). If you're not sure where to get started, take a look at the following

categories :

-Basic Components

-User Interface

-List Views

-Android-specific

-iOS-specific

You're not limited to the components and APIs bundled with React Native. React Native has a community of thousands of developers. If you're looking for a library that does something specific, please refer to this guide about finding libraries.

Optimal performance

The performance factor of React Native

comes from its use of a separate thread

from Native applications anduser

interface. It is easier for React Native to

get connected to the operating system

and generate a code for the native API

freely.

-To improve your React Native

application performance, here are some

common practices, which will surely help

you a lot during the production of a

complex project This is one the most

common issues for native applications

with a lot of unnecessary processes

running in the background. After that

shows you all template choose leaks.

Cost-Effective Solution

The code reusability in React Native is

exceptionally efficient in reducing the

cost of app creation. As the developers

do not require to use separate codes for

the separate operating systems and

devices, both the platforms can be

coded just with a single programming

language, i.e., React Native.

The mobile app development cost

that you would normally have to pay

in the case of Native app

development is at least two to

three-fold higher than the cost to

develop a react native app.

{{ message }}

React Native versions

Open source React Native releases

follow a monthly release train that is

coordinated on GitHub through the

react-native-releases repository.

-At the beginning of each month, a new

release candidate is created off the

master branch of facebook/react-native.

The release candidate will soak for a

month to allow contributors like yourself

to verify the changes and to identify any

issues by writing clear, actionable bug

reports. Eventually, the release

candidate will be promoted to stable.

How to convert your Native Android &

iOS app to React Native

-React Native was introduced as an open- source platform. React Native doesn’t require CSS or HTML. Instead, the React Native developers write native code in Java or Objective-C.

  • When the owner of a platform with billions of end users makes a shift, it is more likely to turn into a revolution. And, the same thing happened with React Native.

Let’s GO ::

Build Android and iOS App from

scratch using React Native

Add Navigation Header and Home Screen

import React, { Component } from 'react';

import { Button, View, Text } from 'react-native';

class HomeScreen extends Component {

static navigationOptions = { title: 'Home', }; render() { return (

Home Screen