React Native
![]() | |
Developer(s) | Meta and community |
---|---|
Initial release | March 26, 2015[1] |
Stable release | 0.79.1[2] ![]() |
Repository | https://github.com/facebook/react-native |
Written in | JavaScript, Java, C++, Objective-C, Python |
Platform | Android, Android TV, iOS, macOS, tvOS, Web, Windows, UWP, and VR |
Type | Application framework |
License | MIT License |
Website | reactnative |
React Native is an open-source UI software framework created by Meta Platforms, Inc.[3] It is used to develop applications for Android[4]: §Chapter 1 ,[5][6] Android TV,[7] iOS[4]: §Chapter 1 ,[6] macOS,[8] tvOS,[9] Web,[10] Windows[8] and UWP[11] by enabling developers to use the React framework along with native platform capabilities.[12] It is used to develop the Android and iOS applications at Facebook, Microsoft, and Shopify.[13] It is also being used to develop virtual reality applications at Oculus.[14]
History
In 2012 Mark Zuckerberg commented, "The biggest mistake we made as a company was betting too much on HTML as opposed to native".[15][16] Using HTML5 for Facebook's mobile version resulted in an unstable application that retrieved data slowly.[17] 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.[18]
In 2015, after months of development, Facebook released the first version for the React JavaScript Configuration. During a technical talk,[19] Christopher Chedeau explained that Facebook was already using React Native in production for its Group App and its Ads Manager App.[20]
As of 2023 Facebook has opted to remove React Native as a platform for mobile.[21]The main reasons cited by Facebook for pulling projects off of React Native were financial. Meta had been investing a significant amount of money, and it was not seeing a return on its investment. The company stated that it was shifting its focus to projects that it believed had more potential for growth.
Facebook also cited technical limitations as a reason for its decision to pull out of React Native. The company stated that it had encountered several challenges while working on the framework, including:
React Native apps are known to have slower performance compared to natively built apps, which can be a drawback for users. While the performance may be acceptable for some Apps, as of 2024 other large scale "early adopters" or the Platform have reverted to native development, including AirB-n-B, Udemy and some divisions of Microsoft. This is likely the same limitation all hybrid platforms face. React Native has made strides in improving thread management, but as of 2024, cannot be called equally performant with native applications.
Face book also sited difficulty with maintaining a consistent codebase. React Native uses a single codebase for multiple platforms, which can lead to inconsistencies and make it harder to maintain. So called "cross platform" competitors, like Cordova and Xamarin have a similar requirement.
Limited native functionality: React Native does not offer access to all native functionality, which can limit the capabilities of the app. By it's very nature, it adds a layer, or more, of abstraction between the developer's code and the underlying operating system. For many memory or process intensive functions, this can be detrimental to the process and not the desired user experience. However, lacking those requirements a React Native user experience can be comparable to a native application user experience.
It can also be said that the platform lacks intuitive means to implement native third-party libraries, and has complex integration with native modules. Integrating native modules can be a complex and time-consuming process. Often integration must be hand coded in native languages in order to become accessible in JavaScript for consumption in a React Native application.
These platform limitations contributed to Facebook's decision to wind down its involvement in the project, per their own statements on the matter. [22] React Native is not a fully compiled language, and as such can be 'decompiled.'
While it is unlikely that React Native as a platform will be uprooted in the short term; it's limitations have caused some early adopters to move off the platform. For those whose applications don't require high levels of performance, memory management, parallel computing, operating system services and easy 3rd Party library integration; it can still be solution. This is realistically a large group of Apps, and core development of the platform is ongoing.[23]
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.[4]: §Chapter 2 It runs in a background process (which interprets the JavaScript written by the developers) directly on the end-device and communicates with the native[4]: §Chapter 2 platform via serialized data over an asynchronous and batched bridge.[24][25]
React components wrap existing native code and interact with native APIs via React's declarative UI paradigm and JavaScript. TypeScript is often used over JavaScript in modern React Native applications due to its increased type safety. [26]
While React Native styling has a similar syntax to CSS, it does not use HTML or CSS.[4]: §Chapter 5 [27] Instead, messages from the JavaScript thread are used to manipulate native views.
React Native is also available for both Windows and macOS, which is currently maintained by Microsoft.
Hello World example
A Hello, World program in React Native looks like this:
import { AppRegistry, Text, View, Button } from 'react-native';
import React from 'react';
const HelloWorldApp = () => {
const [count, setCount] = React.useState(0);
const incrementCount = () => {
setCount((prevCount) => prevCount + 1);
};
return (
<View>
<Text>Hello world!</Text>
<Text>{count}</Text>
<Button onPress={incrementCount} title="Increase Count" />
</View>
);
};
export default HelloWorldApp;
AppRegistry.registerComponent('HelloWorld', () => HelloWorldApp);
See also
- React (JavaScript library)
- Multiple phone web-based application framework
- NativeScript
- Xamarin
- Titanium SDK
- Apache Cordova
- Flutter (software)
- Qt (software)
- Codename One
Citations
- ^ "React Native: Bringing modern web techniques to mobile". 26 March 2015.
- ^ "Release 0.79.1". 15 April 2025. Retrieved 27 April 2025.
- ^ "Chapter 1. What Is React Native?". oreilly.com. O’Reilly Media, Inc. Retrieved 30 July 2020.
- ^ a b c d e Eisenman 2016.
- ^ "Android Release for React Native". 14 September 2015.
- ^ a b Shankland, Stephen (March 29, 2018). "Mozilla's radical open-source move helped rewrite rules of tech". CNET. Retrieved May 11, 2022.
- ^ "Building For TV Devices · React Native". reactnative.dev. Retrieved 2020-10-02.
- ^ a b "React Native for Windows + macOS · Build native Windows & macOS apps with Javascript and React". microsoft.github.io. Retrieved 2020-10-02.
- ^ "React Native for Apple TV". React Native for Apple TV. Retrieved 2020-10-02.
- ^ "React Native for Web". GitHub. 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.
- ^ "React Native Showcase". react.native.dev. Retrieved 2023-04-04.
- ^ "React Native in H2 2021 · React Native". reactnative.dev. Retrieved 2021-08-20.
- ^ "Zuckerberg's Biggest Mistake? 'Betting on HTML5'". Mashable. Retrieved 7 April 2018.
- ^ Zuckerberg, Mark (2012-09-12). "Fireside Chat With Facebook Founder and CEO Mark Zuckerberg". TechCrunch (interview). Retrieved 2021-08-16.
- ^ Warren, Christina. "Zuckerberg's Biggest Mistake? 'Betting on HTML5'". Mashable. Retrieved 2020-10-29.
- ^ "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". 26 March 2015.
- ^ "Facebook's Departure from React Native". Retrieved 5 March 2024.
- ^ "Facebook's Departure from React Native". Retrieved 5 March 2024.
- ^ "What Is the Future of React Native? [2024]". Retrieved 5 March 2024.
- ^ "Bridging in React Native". 14 October 2015. Retrieved 16 January 2018.
- ^ "How we build React Native app: 7 things which save your development time. Part 2". Retrieved 2019-11-06.
- ^ "Using TypeScript". reactnative.dev. Meta Platforms, Inc. Retrieved 14 July 2023.
- ^ "React Native Style". Retrieved 24 February 2021.
References
- Eisenman, Bonnie (2016). Learning React Native. O'Reilly. ISBN 978-1-491-92900-1.