Home > Web Front-end > JS Tutorial > body text

What is the difference between weex and react native

coldplay.xixi
Release: 2020-11-26 17:01:50
Original
3693 people have browsed it

The difference between weex and react native: 1. From a design perspective, react native is similar to many oop languages, while weex is more like HTML for web development; 2. Weex can compile web-side code, but react native cannot.

What is the difference between weex and react native

  • This method is suitable for all brands of computers

weex The difference between react native and react native:

weex

Introduction:

weex is an application open sourced by Alibaba in June 2016 Used to build a mobile cross-platform UI framework

Features:

  • Lightweight: lightweight, simple syntax, easy to use

  • Extendable: Extensible, rich built-in components, extensible API,

  • High Performance: High performance

Core concept:

Write Once Run Everywhere

Based on JS development framework:

weex based on vue.js

React Native

Introduction :

The cross-platform UI framework open sourced by Facebook at the F8 Developer Conference in March 2015

Core concept: LEARN ONCE, WRITE ANYWHERE

Based on JS development framework:

React Native is based on React

Similarities and differences between Weex and React Native

Same points:

  • all adopt the Web development model and use JS development;

  • can debug JS code directly in Chrome;

  • Both support cross-platform development;

  • can implement hot reload and check the effect while updating the code;

The differences are:

1. React-native is similar to react, while weex is the system of vue.

2. From a design perspective, react-native is similar to many oop languages, while weex is more like HTML for web development. react-native does not combine page (templete), function (script), and style (css) like weex. ) is divided into three specific code writing locations in a .vue, react-native can define execution scripts in the page

3. Loading package: react-native loading package will load the entire js through an entry file. bundle and weex can load the corresponding js respectively, which may affect the corresponding loading speed

4. The format of the output package: react-native outputs a large bundle file, and weex outputs multiple In the form of a .js file, when react-native outputs the package, it will output the dependent framework into the bundle, while weex outputs specific functional logic packages, and the corresponding dependency packages are provided by the framework layer of weex. Weex can naturally support sub-packaging and solve the problem of loading speed of update iterations. React-native needs to sub-package through bundle-metro or other forms to optimize the loading speed of the package.

5, react- Native has many design structures to support it. Weex seems to be mvc. React-native’s state management is better implemented?

6. The support of underlying class libraries and function libraries react-native is more abundant

7. Weex can compile web-side code, react-native cannot, react-native is more focused on mobile

8. At the configuration level, react-native only provides a package.json to organize the project Clearly, weex has done a lot of environment configuration

9. Differences in packaging methods. React-native packaging uses commands to create jsbundle, and then uses native commands to create the installation package for the corresponding platform. If weex packages It can be directly typed into the installation package of the corresponding platform. If it is only an incremental js package, the corresponding package will be output in the form of weex run

Related free learning recommendations: javascript(video)

The above is the detailed content of What is the difference between weex and react native. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!