跳到主要内容

React Native

使用 React 构建 Android、iOS 等原生应用

使用 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 让你能够创建真正的原生应用,并且不会影响用户体验。它提供了一组核心的、与平台无关的原生组件,比如 ViewTextImage,这些组件可以直接映射到平台的原生 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.

Explain Like I'm 5: React Native

Why React Native?

1:42

React Conf 2025 React Native Keynote

React Conf 2025
React Native Keynote

55:13

React Conf 2024 React Native Keynote

React Conf 2024
React Native Keynote

55:14

Mobile Innovation with React Native, ComponentKit, and Litho

FB 2019
Mobile innovation with React Native

45:29

Meta 支持,社区驱动

Meta 在 2015 年发布了 React Native,并一直在维护它。

在 2018 年,React Native 是 GitHub 上拥有第二多贡献者的代码库。如今,React Native 得到了来自全球个人和公司(包括 Callstack、Expo、Infinite Red、Microsoft 和 Software Mansion)的贡献和支持。

我们的社区一直在推出令人兴奋的新项目,并通过诸如 React Native Windows、React Native macOS 和 React Native Web 等代码库,探索超越 Android 和 iOS 的平台。

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 社区

开始使用