Home  >  Article  >  Web Front-end  >  Does vue have react native?

Does vue have react native?

藏色散人
藏色散人Original
2021-02-02 09:18:562458browse

Both vue and React have solutions that support native. React has React native, and Vue has weex; weex is Alibaba’s open source cross-platform development solution for building high-performance, scalable native applications.

Does vue have react native?

The operating environment of this article: windows7 system, vue2.0 version, Dell G3 computer.

Native refers to developing apps using native APIs, such as iOS development using Objective-C or Swift language. So does Vue have a native solution similar to react native? The following article will introduce it to you.

Does vue have a native solution similar to react native?

Both vue and React have native support solutions, React has React native, and Vue has weex.

weex introduction

Weex is Alibaba’s open source cross-platform development solution for building high-performance, scalable native applications. First, let’s summarize the characteristics of weex:

1. Page development currently supports Rax and Vue

Weex does not only support Vue and Rax. You can also integrate your favorite front-end framework into Weex. There is a documentation extending the front-end framework describing how to implement it, but the process is still very complex and tricky, and you need to know many low-level details about the communication between js-native and the native rendering engine.

2. Write once and run on three ends (Android, iOS, front-end)

The premise is that weex sdk is integrated. In addition, the visual performance cannot be exactly the same, and some will have some differences. , some adaptation is required. Therefore, when writing a weex page, if it supports three terminals, you need to perform self-tests on all three terminals.

3. The UI is drawn through native components, and the JavaScript logic runs in the JS engine. The two communicate through JavaScriptCore.

Components used in weex need to be registered on the native side, so that only in weex can It can be used to search through the map recorded during registration when running. Weex SDK has built-in registration of some basic components, including list, text, input, etc. WXJSCoreBridge encapsulates JavaScriptCore to implement communication between native and js.

4. Support Native extension

You can encapsulate native UI components into components and native logic codes into modules. So it can be used in weex. The natiev UI components here include modal, webview, image, etc., and the native logic code here includes storage, network, etc.

5. Each weex page will be packaged into a js file, and weex sdk will render the js file into a view

Weex packaging uses webpack to package each page into an independent one js file, weex sdk will parse the js, draw the UI part into a view, and then bind the view's events to the js code.

Recommended: "vue tutorial"

The above is the detailed content of Does vue have 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