From 493147a17eefbffbb99abfb423ae40dfe808f41d Mon Sep 17 00:00:00 2001 From: zhyx2 Date: Sat, 24 May 2025 09:19:08 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#ICA5CR]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9@react-native-oh-tpl/react-native-screens=E5=BA=93?= =?UTF-8?q?=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhyx2 --- en/react-native-oh-tpl-react-native-screens.md | 8 ++++++-- zh-cn/react-native-oh-tpl-react-native-screens.md | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md index dd91674c..bcdd3b9f 100644 --- a/en/react-native-oh-tpl-react-native-screens.md +++ b/en/react-native-oh-tpl-react-native-screens.md @@ -19,7 +19,9 @@ The implementation of this library depends on the native code from @react-native-oh-tpl/native and @react-navigation/native-stack and @react-native-oh-tpl/react-native-safe-area-context and @react-native-oh-tpl/react-native-gesture-handler. If this library is included into your application, there is no need to include it again; you can skip the steps in this section and use it directly. -If it is not included, follow the guide provided in [@react-native-oh-tpl/native](/en/react-navigation-native.md) and [@react-native-oh-tpl/native-stack](/en/react-navigation-native-stack.md) and [@react-native-oh-tpl/react-native-safe-area-context](/en/react-native-safe-area-context.md) and [@react-native-oh-tpl/react-native-gesture-handler](/en/react-native-gesture-handler.md) to add it to your project. +Note: If the `@react-native-oh-tpl/native-stack` library has been introduced, please uninstall it. Otherwise, this library will fail to be referenced and cannot be used. + +If it is not included, follow the guide provided in [@react-native-oh-tpl/native](/en/react-navigation-native.md) and [@react-native-oh-tpl/react-native-safe-area-context](/en/react-native-safe-area-context.md) and [@react-native-oh-tpl/react-native-gesture-handler](/en/react-native-gesture-handler.md) to add it to your project. Please visit the Releases page of the third-party library to check the corresponding version information: [@react-native-oh-tpl/react-native-screens Releases](https://github.com/react-native-oh-library/react-native-harmony-screens/releases). For older versions that have not been published to npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. @@ -28,12 +30,14 @@ Go to the project directory and execute the following instruction: ```bash npm install @react-native-oh-tpl/react-native-screens +npm install @react-navigation/native-stack@^6.9.13 ``` #### **yarn** ```bash -npm install @react-native-oh-tpl/react-native-screens +yarn install @react-native-oh-tpl/react-native-screens +yarn install @react-navigation/native-stack@^6.9.13 ``` The following code shows the basic use scenario of the repository: diff --git a/zh-cn/react-native-oh-tpl-react-native-screens.md b/zh-cn/react-native-oh-tpl-react-native-screens.md index dc93d7ac..0b905519 100644 --- a/zh-cn/react-native-oh-tpl-react-native-screens.md +++ b/zh-cn/react-native-oh-tpl-react-native-screens.md @@ -19,7 +19,9 @@ 本库实现依赖 @react-navigation/native 、 @react-navigation/native-stack 、 @react-native-oh-tpl/react-native-safe-area-context 、 @react-native-oh-tpl/react-native-gesture-handler 的原生端代码,如已在工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 -如未引入请参照 [@react-navigation/native 文档的 Link 章节](/zh-cn/react-navigation-native.md) , [@react-navigation/native-stack 文档的 Link 章节](/zh-cn/react-navigation-native-stack.md) ,[@react-native-oh-tpl/react-native-gesture-handler 文档的 Link 章节](/zh-cn/react-native-gesture-handler.md) ,[@react-native-oh-tpl/react-native-safe-area-context 文档的 Link 章节](/zh-cn/react-native-safe-area-context.md)进行引入。 +注:若已引入 `@react-native-oh-tpl/native-stack` 库,请务必卸载,否则本库将无法正确指向,导致无法使用。 + +如未引入请参照 [@react-navigation/native 文档的 Link 章节](/zh-cn/react-navigation-native.md) ,[@react-native-oh-tpl/react-native-gesture-handler 文档的 Link 章节](/zh-cn/react-native-gesture-handler.md) ,[@react-native-oh-tpl/react-native-safe-area-context 文档的 Link 章节](/zh-cn/react-native-safe-area-context.md)进行引入。 请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-screens Releases](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -29,12 +31,14 @@ ```bash npm install @react-native-oh-tpl/react-native-screens +npm install @react-navigation/native-stack@^6.9.13 ``` #### **yarn** ```bash -npm install @react-native-oh-tpl/react-native-screens +yarn install @react-native-oh-tpl/react-native-screens +yarn install @react-navigation/native-stack@^6.9.13 ``` 下面的代码展示了这个库的基本使用场景: -- Gitee