Home > Article > Web Front-end > What framework is react native?
React Native is an open source cross-platform mobile application development framework that supports the two major platforms of iOS and Android; it uses Javascript language, JSX, and CSS to develop mobile applications, so technicians familiar with Web front-end development only need It takes very little learning to get into the world of mobile app development.
Related recommendations: "React Video Tutorial"
React Native (RN for short) is a product launched by Facebook in April 2015 The open source cross-platform mobile application development framework is a derivative of Facebook's earlier open source JS framework React on the native mobile application platform. It supports the two major platforms of iOS and Android.
React Native uses Javascript language, JSX similar to HTML, and CSS to develop mobile applications, so technicians who are familiar with Web front-end development can enter the field of mobile application development with very little learning.
React Native enables you to write native mobile applications using only JavaScript. It is consistent with React in terms of design principles and uses a declarative component mechanism to build a rich and colorful user interface.
import React, { Component } from 'react'; import { Text, View } from 'react-native'; class WhyReactNativeIsSoGreat extends Component { render() { return ( <View> <Text> 如果你喜欢在Web上使用React,那你也肯定会喜欢React Native. </Text> <Text> 基本上就是用原生组件比如'View'和'Text' 来代替web组件'div'和'span'。 </Text> </View> ); } }
The above code is a simple component written using react native.
React Native focuses on improving the development efficiency of multi-platform development - you only need to learn once and write for any platform.
React Native applications are real mobile applications
React Native does not produce "web applications", or "HTML5 applications", or "hybrid applications" ". The end product is a true mobile app that feels almost indistinguishable from apps written in Objective-C or Java. The basic UI components used by React Native are exactly the same as native applications. All you have to do is combine these basic components using JavaScript and React.
import React, { Component } from 'react'; import { Image, ScrollView, Text } from 'react-native'; class AwkwardScrollingImageWithText extends Component { render() { return ( <ScrollView> <Image source={{uri: 'https://i.chzbgr.com/full/7345954048/h7E2C65F9/'}} style={{width: 320, height:180}} /> <Text> 在iOS上,React Native的ScrollView组件封装的是原生的UIScrollView。 在Android上,封装的则是原生的ScrollView。 在iOS上,React Native的Image组件封装的是原生的UIImageView。 在Android上,封装的则是原生的ImageView。 React Native封装了这些基础的原生组件,使你在得到媲美原生应用性能的同时,还能受益于React优雅的架构设计。 </Text> </ScrollView> ); } }
For more programming-related knowledge, please visit: Introduction to Programming! !
The above is the detailed content of What framework is react native?. For more information, please follow other related articles on the PHP Chinese website!