React Native
一次学习,随处编写。
使用 React 为 Android、iOS 等平台创建原生应用
React Native 将使用 React 进行开发的最佳部分带到原生开发中。它是一个一流的 JavaScript 库,用于构建用户界面。
index.js
function HomeScreen() {
return (
<View>
<Text> Hello World 👋 🌍!</Text>
</View>
);
}

使用 JavaScript 编写,使用原生代码渲染。 React 原语渲染到原生平台 UI,这意味着你的应用使用与其他应用相同的原生平台 API。
面向所有人的原生开发
React Native 让你创建真正的原生应用,并且不会降低用户的体验。它提供了一组平台无关的原生组件核心集,例如 View
、 Text
和 Image
,它们直接映射到平台的原生 UI 构建块。

使用框架快速入门
React Native 将 React 编程范式引入到 Android 和 iOS 等平台。它没有规定如何进行路由,也没有规定如何访问众多平台 API 中的每一个。要使用 React Native 构建新应用,我们推荐使用如下框架: Expo.

基于文件的路由
使用你的文件系统以最少的样板代码创建堆栈、模态、抽屉和标签屏幕。

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

开发者工具
使用 Expo Go 快速开始,然后继续使用 expo-dev-client:一个为需要原生更改的应用添加 Expo 工具的模块。
观看和学习
观看 React 团队的演讲,学习如何充分利用 React Native。在以下平台找到最新信息: X.
FB 2019:使用 React Native 进行移动创新
45:29
为什么选择 React Native?
1:42
Meta 支持。社区驱动。
Meta 于 2015 年发布了 React Native,并一直维护至今。
2018 年,React Native 在 第二高 的贡献者数量,在 GitHub 上所有仓库中排名第二。如今,React Native 得到了来自世界各地的个人和公司的贡献支持,包括 Callstack, Expo、Infinite Red、 Microsoft 和 Software Mansion.
我们的社区一直在发布令人兴奋的新项目,并探索 Android 和 iOS 以外的平台,例如以下仓库: React Native Windows, React Native macOS 和 React Native Web.