React Native Explained

React Native
Developer:Meta and community
Released:[1]
Repo:https://github.com/facebook/react-native
Programming Language:JavaScript, Java, C++, Objective-C, Python
Platform:Android, Android TV, iOS, macOS, tvOS, Web, Windows, UWP, and VR
Genre:Application framework
License:MIT License

React Native is an open-source UI software framework created by Facebook Inc. (now Meta Platforms).[2] It is used to develop applications for Android,[3] [4] Android TV,[5] iOS, macOS,[6] tvOS,[7] Web,[8] Windows and UWP[9] by enabling developers to use the React framework along with native platform capabilities.[10] It is used to develop Android and iOS applications at Facebook, Microsoft, and Shopify.[11] It is also being used to develop virtual reality applications at Oculus.[12]

History

In 2012 Mark Zuckerberg commented, "The biggest mistake we made as a company was betting too much on HTML5 as opposed to native".[13] [14] Using HTML5 for Facebook's mobile version resulted in an unstable application that retrieved data slowly.[15] 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.[16]

In 2015, after months of development, Facebook released the first version for the React JavaScript Configuration. During a technical talk,[17] Christopher Chedeau explained that Facebook was already using React Native in production for its Group App and its Ads Manager App.[18]

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.[19] [20]

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.[21]

While React Native styling has a similar syntax to CSS, it does not use HTML or CSS.[22] 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 from 'react-native';import React from 'react';

const HelloWorldApp = => ;

export default HelloWorldApp;

AppRegistry.registerComponent('HelloWorld', => HelloWorldApp);

See also

References

Notes and References

  1. Web site: React Native: Bringing modern web techniques to mobile . 26 March 2015.
  2. Web site: Chapter 1. What Is React Native? . oreilly.com . O’Reilly Media, Inc. . 30 July 2020 .
  3. Web site: Android Release for React Native. 14 September 2015.
  4. Web site: Mozilla's radical open-source move helped rewrite rules of tech. Stephen. Shankland. CNET. March 29, 2018. May 11, 2022.
  5. Web site: Building For TV Devices · React Native. 2020-10-02. reactnative.dev. en.
  6. Web site: React Native for Windows + macOS · Build native Windows & macOS apps with Javascript and React. 2020-10-02. microsoft.github.io.
  7. Web site: React Native for Apple TV. 2020-10-02. React Native for Apple TV. en-US.
  8. Web site: React Native for Web. . 2019-11-06.
  9. Web site: React Native on the Universal Windows Platform. Windows Apps Team. April 13, 2016. blogs.windows.com. 2016-11-06.
  10. Web site: Out-of-Tree Platforms . reactnative.dev . Facebook, Inc. . 30 July 2020 .
  11. Web site: React Native Showcase. 2023-04-04. react.native.dev. en.
  12. Web site: React Native in H2 2021 · React Native. 2021-08-20. reactnative.dev. en.
  13. Web site: Zuckerberg's Biggest Mistake? 'Betting on HTML5'. Mashable. 7 April 2018.
  14. Web site: Zuckerberg. Mark. 2012-09-12. Fireside Chat With Facebook Founder and CEO Mark Zuckerberg. 2021-08-16. TechCrunch. interview.
  15. Web site: Warren. Christina. Zuckerberg's Biggest Mistake? 'Betting on HTML5'. 2020-10-29. Mashable. en.
  16. Web site: A short Story about React Native. 16 January 2018.
  17. Web site: Christopher. Chedeau. A Deep Dive into React Native. YouTube. 16 January 2018.
  18. Web site: React Native: Bringing modern web techniques to mobile. 26 March 2015.
  19. Web site: Bridging in React Native. 16 January 2018. 14 October 2015.
  20. Web site: How we build React Native app: 7 things which save your development time. Part 2. 2019-11-06.
  21. Web site: Using TypeScript . reactnative.dev . Meta Platforms, Inc. . 14 July 2023.
  22. Web site: React Native Style. 24 February 2021.