React Native
React Native is an open-source mobile application framework created by Facebook, Inc. [3] It is used to develop applications for Android[4], iOS, Web[5] and UWP[6] by enabling developers to use React along with native platform capabilities [7].
Developer(s) | Facebook and community |
---|---|
Initial release | March 26, 2015[1] |
Stable release | 0.63.1
/ July 14, 2020[2] |
Repository | https://github.com/facebook/react-native |
Written in | JavaScript, Java, C++, Objective-C, Objective-C++, Python |
License | MIT License |
Website | reactnative |
History
In 2012 Mark Zuckerberg commented, "The biggest mistake we made as a company was betting too much on HTML as opposed to native".[9] He promised that 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.[10] They decided to organise an internal Hackathon to perfect this prototype in order to be able to build native apps with this technology.[11]
After months of development, Facebook released the first version for the React JavaScript Configuration in 2015. During a technical talk,[12] Christopher Chedeau explained that Facebook was already using React Native in production for their Group App and their Ads Manager App.[13]
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 a serialisation, asynchronous and batched Bridge.[14][15][16]
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.[17]
React Native does not use HTML or CSS. 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 for Android and Objective-C or Swift for iOS which make it even more flexible.
Hello World Example
A Hello, World program in React Native looks like this:
1 import React from 'react';
2 import { AppRegistry, Text } from 'react-native';
3
4 const HelloWorldApp = () => <Text>Hello world!</Text>;
5 export default HelloWorldApp;
6
7 // Skip this line if using Create React Native App
8 AppRegistry.registerComponent('HelloWorld', () => HelloWorldApp);
9
10 // The React native code can also be imported from another component with the following code:
11 import HelloWorldApp from './HelloWorldApp';
See also
- List of rich Internet application frameworks
- Multiple phone web-based application framework
- NativeScript
- Xamarin
- Appcelerator Titanium
- Apache Cordova
- Flutter (software)
References
- "React Native: Bringing modern web techniques to mobile".
- "Releases – Facebook/React". GitHub.
- "Chapter 1. What Is React Native?". oreilly.com. O’Reilly Media, Inc. Retrieved 30 July 2020.
- "Android Release for React Native".
- "React Native for Web". Retrieved 2019-11-06.
- Windows Apps Team (April 13, 2016). "React Native on the Universal Windows Platform". blogs.windows.com. Retrieved 2016-11-06.
- "Out-of-Tree Platforms". reactnative.dev. Facebook, Inc. Retrieved 30 July 2020.
- https://github.com/status-im/react-native-desktop
- "Zuckerberg's Biggest Mistake? 'Betting on HTML5'". Mashable. Retrieved 7 April 2018.
- "React (JavaScript library)".
- "A short Story about React Native". Retrieved 16 January 2018.
- Christopher, Chedeau. "A Deep Dive into React Native". YouTube. Retrieved 16 January 2018.
- "React Native: Bringing modern web techniques to mobile".
- "Bridging in React Native". 14 October 2015. Retrieved 16 January 2018.
- "React Native vs Flutter: Which Cross-Platform Framework is Better?". Retrieved 2019-11-06.
- "How we build React Native app: 7 things which save your development time. Part 2". Retrieved 2019-11-06.
- "How React Native can Empower App Development Process?". Retrieved 15 February 2019.