Some of this article's listed sources may not be reliable.(February 2019) |
Developer(s) | Facebook and community |
---|---|
Initial release | March 26, 2015[1] |
Stable release | 0.64.0
/ March 12, 2021[2] |
Preview release | 0.64.0-rc.4
/ March 2, 2021[2] |
Repository | https://github.com/facebook/react-native |
Written in | JavaScript, Java, C++, Objective-C, Objective-C++, Python |
Platform | Android, Android TV, iOS, macOS, tvOS, Web and Windows |
Type | Application framework |
License | MIT License |
Website | reactnative |
React Native is an open-source mobile application framework created by Facebook, Inc.[3] It is used to develop applications for Android,[4]Android TV,[5]iOS, macOS,[6]tvOS,[7]Web,[8]Windows[6] and UWP[9] by enabling developers to use React's framework along with native platform capabilities.[10]
In 2012 Mark Zuckerberg commented, "The biggest mistake we made as a company was betting too much on HTML as opposed to native".[11] Using HTML5 for Facebook's mobile version resulted in an unstable application that retrieved data slowly.[12] He promised Facebook would soon deliver a better mobile experience.
Inside Facebook, Jordan Walke found a way to generate UI elements for iOS from a background JavaScript thread, which became the basis for the React web framework. They decided to organize an internal Hackathon to perfect this prototype in order to be able to build native apps with this technology.[13]
After months of development, Facebook released the first version for the React JavaScript Configuration in 2015. During a technical talk,[14] Christopher Chedeau explained that Facebook was already using React Native in production for their Group App and their Ads Manager App.[15]
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.[16][17]
React 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.[18]
While React Native styling has a similar syntax to CSS, it does not use HTML or CSS.[19] Instead, messages from the JavaScript thread are used to manipulate native views. React Native also allows developers to write native code in languages such as Java or Kotlin for Android and Objective-C or Swift for iOS, which makes it even more flexible.
A Hello, World program in React Native looks like this:
import React from 'react';
import { AppRegistry, Text } from 'react-native';
const HelloWorldApp = () => <Text>Hello world!</Text>;
export default HelloWorldApp;
// Skip this line if using Create React Native App
AppRegistry.registerComponent('HelloWorld', () => HelloWorldApp);
// The React native code can also be imported from another component with the following code:
import HelloWorldApp from './HelloWorldApp';
By: Wikipedia.org
Edited: 2021-06-18 12:26:09
Source: Wikipedia.org