首页指南参考教程

将 Expo 与现有 React Native 应用结合使用的概述

了解如何将 Expo 工具和服务与现有的 React Native 应用结合使用。


如果你有一个不使用任何 Expo 工具的 React Native 应用,你可能想知道 Expo 可以为你提供什么,为什么你可能想要使用 Expo 工具和服务,以及如何开始。

¥If you have a React Native app that doesn't use any Expo tools, you might be wondering what Expo can provide for you, why you might want to use Expo tools and services, and how to get started.

Expo 提供的所有工具和服务在任何 React Native 应用中都能很好地运行。

¥All tools and services provided by Expo work great in any React Native app.

你可以使用 EAS 快速设置专业的 CI/CD 工作流程,以构建、审核、部署和更新你的应用。Expo CLI 为使用 React Native 提供最佳命令行体验。Expo SDK 是 React Native 的扩展标准库。它为开发者提供了高质量、维护良好的原生库,这些库使用一致的 API 约定,使它们更易于学习和使用。

¥You can use EAS to get quickly set up with a professional CI/CD workflow for building, reviewing, deploying, and updating your apps. Expo CLI provides the best command-line experience for working with React Native. The Expo SDK is an extended standard library for React Native. It gives developers high-quality, well-maintained native libraries that use consistent API conventions to make them easier to learn and use.

如果你曾经为 React Native 编写过原生模块,你会惊讶地发现,使用 Expo 模块 API 提供的惯用 Swift 和 Kotlin DSL 构建和维护模块要容易得多。

¥If you've ever written a native module for React Native, you'll be surprised how much easier it is to build and maintain modules with the idiomatic Swift and Kotlin DSL provided by the Expo Modules API.

还有更多值得探索的内容,以下链接将帮助你探索可用的选项。

¥There's so much more to explore, and the links below will help you to explore the options available to you.

后续步骤

¥Next Steps

安装 Expo 模块

If you have already initialized a React Native app without create-expo-app, learn how to install the Expo module library.

使用 Expo SDK

使用 Expo SDK 提供的众多库之一,这是一组提供对原生 API 访问的广泛库。

编写原生模块

使用 Expo Modules API 使用 Swift 和 Kotlin 编写原生模块。

使用 Expo CLI

了解 Expo CLI 相对于 @react-native-community/cli 提供的诸多好处。

原生项目升级助手

查看你需要对原生项目进行的所有更改的逐个文件差异,以将它们升级到下一个 Expo SDK 和 React Native 版本。

采用预构建

了解如何通过按需从配置生成原生项目来简化原生项目的维护。

应用分发

使用单个命令构建应用并将其提交到应用商店。