跳到主要内容

React Native

一次学习,随处编写。

使用 React 为 Android、iOS 及更多平台创建原生应用

React Native 将 React 开发的最佳实践带入原生开发。
它是一个一流的 JavaScript 库,用于构建用户界面。

index.js
function HomeScreen() { 
return (
<View>
<Text> Hello World 👋 🌍!</Text>
</View>
);
}
Android device and iOS deviceAndroid device and iOS device

用 JavaScript 编写,用原生代码渲染。 React 基础组件渲染到原生平台 UI,这意味着你的应用使用与其他应用相同的原生平台 API。

人人皆可原生开发

React Native 让你能够创建真正的原生应用,且不影响用户体验。它提供了一套核心的与平台无关的原生组件,例如 View TextImage,它们直接映射到平台的原生 UI 构建块。

A React Native UI pointing out native elements like Views, ScrollViews, and moreA React Native UI pointing out native elements like Views, ScrollViews, and more

使用框架抢占先机

React Native 将 React 编程范式引入 Android 和 iOS 等平台。它不规定如何进行路由,也不规定如何访问众多平台 API。要使用 React Native 构建新应用,我们推荐使用诸如 Expo.

File system with folders and files representing screens and navigationFile system with folders and files representing screens and navigation

基于文件的路由

使用文件系统,以最少的样板代码创建堆栈、模态、抽屉和选项卡屏幕。

Grid of icons representing libraries, SDKs, and native codeGrid of icons representing libraries, SDKs, and native code

使用任何库、SDK 或原生代码

生成原生更改或编写你自己的原生代码。使用超过 50 个模块来创建你的应用。

List of developer tool toggles for debugging, performance, and moreList of developer tool toggles for debugging, performance, and more

开发者工具

使用 Expo Go 快速上手,然后继续使用 expo-dev-client:一个将 Expo 工具添加到需要原生更改的应用中的模块。

观看和学习

观看 React 团队的演讲,学习如何充分利用 React Native。
Bluesky X.

FB 2019:React Native 移动创新

45:29

为什么选择 React Native?

1:42

Meta 支持。社区驱动。

Meta 于 2015 年发布 React Native,并一直维护至今。

在 2018 年,React Native 在 GitHub 上拥有 第二高 的贡献者数量。如今,React Native 得到了全球个人和公司(包括 Callstack, ExpoInfinite Red Microsoft Software Mansion)的贡献支持。.

我们的社区一直在发布令人兴奋的新项目,并探索 Android 和 iOS 之外的平台,例如 React Native Windows, React Native macOS React Native Web.

React Native 被用于数千个应用程序,但你很可能已经在这些应用程序中的一个中使用过它

  • Facebook
  • Facebook Ads Manager
  • Meta Horizon
  • Messenger Desktop
  • Microsoft Office
  • Microsoft Outlook
  • Microsoft Teams
  • Xbox Game Pass
  • Amazon Shopping
  • Shopify
  • Shop: All your favorite brands
  • Coinbase
  • PUMA
  • PlayStation App
  • WordPress - Website Builder
  • Tableau
  • FlipKart
  • Mercari
  • Discord
  • Bloomberg
  • Tesla
  • Bolt Food: Delivery & Takeaway
  • Mattermost
  • Klarna | Shop now. Pay later.
  • NFL

以及更多

欢迎加入 React Native 社区

开始