Home  >  Article  >  Web Front-end  >  What framework is react native?

What framework is react native?

青灯夜游
青灯夜游Original
2020-11-10 16:06:103162browse

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.

What framework is react native?

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>
          基本上就是用原生组件比如&#39;View&#39;和&#39;Text&#39;
          来代替web组件&#39;div&#39;和&#39;span&#39;。
        </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 &#39;react&#39;;
import { Image, ScrollView, Text } from &#39;react-native&#39;;
class AwkwardScrollingImageWithText extends Component {
  render() {
    return (
      <ScrollView>
        <Image
          source={{uri: &#39;https://i.chzbgr.com/full/7345954048/h7E2C65F9/&#39;}}
          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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn