日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

React Native指南

發(fā)布時間:2023/11/29 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 React Native指南 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

React本機 (React Native)

React Native is a cross-platform framework for building mobile applications that can run outside of the browser?—?most commonly iOS and Android applications

React Native是一個跨平臺框架,用于構(gòu)建可在瀏覽器外部運行的移動應(yīng)用程序-最常見的iOS和Android應(yīng)用程序

It can be used to build applications on Windows devices, desktop OS’s, and Apple TV apps as well but this guide will only be covering its most common purpose?—?Android and iOS applications.

它也可以用于在Windows設(shè)備,臺式機操作系統(tǒng)和Apple TV應(yīng)用程序上構(gòu)建應(yīng)用程序,但本指南僅涵蓋其最常見的用途-Android和iOS應(yīng)用程序。

Table of Contents

目錄

  • What is React Native?

    什么是React Native?

  • Reasons to choose React Native

    選擇React Native的理由

  • How to Get Started with React Native

    如何開始使用React Native

什么是React Native? (What is React Native?)

React Native falls in-between native and hybrid applications on the mobile app spectrum. The user interface you create is entirely native and the overall application performance is nearly as good as writing a native app.

在移動應(yīng)用程序范圍內(nèi),React Native介于本地應(yīng)用程序和混合應(yīng)用程序之間。 您創(chuàng)建的用戶界面完全是本機的,整體應(yīng)用程序性能幾乎與編寫本機應(yīng)用程序一樣好。

It also gives you the flexibility to embed web views (webpages) or native code (Java/Kotlin for Android, Objective C/Swift for iOS) inside your applications wherever you want.

它還使您可以靈活地將Web視圖(網(wǎng)頁)或本機代碼(Android的Java / Kotlin,iOS的Objective C / Swift)嵌入到所需的位置。

It follows the same pattern as React where the views (what you see on the screen) are rendered from the JavaScript files. The difference is that it supplies its own API for handling native mobile views vs the DOM on the web.

它遵循與React相同的模式,其中從JavaScript文件渲染視圖(在屏幕上看到的內(nèi)容)。 不同之處在于,它提供了自己的API來處理本機移動視圖,而不是Web上的DOM。

If you are confused about how this works, follow this guide on freeCodeCamp and it will take you step by step through these concepts.

如果您對它的工作方式感到困惑,請遵循freeCodeCamp上的本指南,它將逐步引導您了解這些概念。

選擇React Native的理由 (Reasons to choose React Native)

  • Code reusability?—?It uses one code based that is shared between both platforms.

    代碼可重用性 -它使用一種基于代碼的代碼,在兩個平臺之間共享。

  • Reuse web tools and skills?—?Reuse JavaScript knowledge, tools and utilities like axios, Redux, and other libraries that don’t require the DOM from the web.

    重用Web工具和技能 -重用JavaScript知識,工具和實用程序,例如axios ,Redux和其他不需要Web DOM的庫。

  • Optimized for developer productivity?—?Comes with features like hot/live module reloading and chrome developer tools for debugging out of the box!

    針對開發(fā)人員的生產(chǎn)力進行了優(yōu)化 -帶有熱/實時模塊重新加載功能以及用于調(diào)試的chrome開發(fā)人員工具等功能!

  • Performance?—?Performs better than hybrid application frameworks like Ionic and Cordova since it is not using web views.

    性能 —由于未使用Web視圖,因此其性能比Ionic和Cordova等混合應(yīng)用程序框架更好。

  • Corporate backing?—?Lots of companies support and contribute to React Native including Walmart, Airbnb, Wix, and, of course, Facebook.

    企業(yè)支持 -許多公司支持和貢獻React Native,包括沃爾瑪,Airbnb,Wix,當然還有Facebook。

  • Community?—?React Native has a large (and growing) community with over 1500 contributors to the core project and thousands more who contribute to various libraries.

    社區(qū) -React Native擁有一個龐大的社區(qū)(并且正在不斷發(fā)展),該社區(qū)有1500多個貢獻者為核心項目,成千上萬的人為各種圖書館做出了貢獻。

  • Better user experience?—?React Native uses the JavaScript code to render native components from your phone’s OS. In other words, the application’s user interface (UI) is entirely native!

    更好的用戶體驗 -React Native使用JavaScript代碼從手機的操作系統(tǒng)渲染本機組件。 換句話說,應(yīng)用程序的用戶界面(UI)完全是本機的!

  • Cross-Platform - Great way to prototype and save time while building either a universal user interface or platform specific mobile application that can run on both iOS and Android devices.

    跨平臺 -在構(gòu)建可在iOS和Android設(shè)備上運行的通用用戶界面或特定于平臺的移動應(yīng)用程序時,實現(xiàn)原型和節(jié)省時間的好方法。

  • 如何開始使用React Native (How to Get Started with React Native)

    There are two quick easy ways to get started with React Native. Depending on your situation, one can be a better option for you.

    有兩種快速簡便的方法可以開始使用React Native。 根據(jù)您的情況,一個可能是您更好的選擇。

  • Create React Native App- Similar to Create React App, it gets up and running using the terminal.

    創(chuàng)建React Native應(yīng)用程序 -與創(chuàng)建React App類似,它使用終端啟動并運行。

  • Expo - Best for prototyping an app or if it is earlier stage. Using Expo you can even create a quick app using drag and drop features from snack.expo.io in the browser.

    博覽會 -最適合制作應(yīng)用原型或處于早期階段的原型。 使用Expo,您甚至可以使用瀏覽器中Snack.expo.io的拖放功能來創(chuàng)建快速應(yīng)用程序。

  • 關(guān)于React Native的更多資源: (More resources on React Native:)

    • How to build mobile apps with React Native

      如何使用React Native構(gòu)建移動應(yīng)用

    • Functional vs Class Components in React Native

      React Native中的功能與類組件

    • How to test React Native Apps with Jest and Enzyme

      如何使用Jest和Enzyme測試React Native Apps

    翻譯自: https://www.freecodecamp.org/news/react-native-guide/

    總結(jié)

    以上是生活随笔為你收集整理的React Native指南的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。