From cb4285aa4f2fa7fb3adc9b80d012e3063335c654 Mon Sep 17 00:00:00 2001 From: zhyx2 Date: Fri, 21 Nov 2025 19:42:54 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:#ID7XEN]=20=E6=96=B0=E5=A2=9Ere?= =?UTF-8?q?act-native-router-flux=E4=B8=AD=E3=80=81=E8=8B=B1=E6=96=87?= =?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 --- en/react-native-router-flux.md | 427 +++++++++++++++++++++++++++++ zh-cn/react-native-router-flux.md | 430 ++++++++++++++++++++++++++++++ 2 files changed, 857 insertions(+) create mode 100644 en/react-native-router-flux.md create mode 100644 zh-cn/react-native-router-flux.md diff --git a/en/react-native-router-flux.md b/en/react-native-router-flux.md new file mode 100644 index 000000000..f6ff56aef --- /dev/null +++ b/en/react-native-router-flux.md @@ -0,0 +1,427 @@ +> version:v0.3.0 + +

+

react-native-router-flux

+

+ + +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-router-flux) + +Please visit the Releases page of the third-party library to check the corresponding version information: + +| Version | Releases info | Support RN version | +|---------|-----------------------------------------------------------------------------------------------------------------------------|-----------| +| 4.3.2 | [@react-native-ohos/react-native-router-flux Releases](https://github.com/react-native-oh-library/react-native-router-flux/releases) | 0.72/0.77 | + +## 1. install and use +### 0.72 +The implementation of this library depends on the native code from @react-native-oh-tpl/react-native-reanimated and @react-native-oh-tpl/react-native-gesture-handler and @react-native-oh-tpl/react-native-safe-area-context. 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/react-native-reanimated](/zh-cn/react-native-reanimated.md) and [@react-native-oh-tpl/react-native-gesture-handler](/zh-cn/react-native-gesture-handler.md) and [@react-native-oh-tpl/react-native-safe-area-context](/zh-cn/react-native-safe-area-context.md) to add it to your project. + +### 0.77 +The implementation of this library depends on the native code from @react-native-ohos/react-native-reanimated and @react-native-ohos/react-native-gesture-handler and @react-native-ohos/react-native-safe-area-context. 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-ohos/react-native-reanimated](/zh-cn/react-native-reanimated.md) and [@react-native-ohos/react-native-gesture-handler](/zh-cn/react-native-gesture-handler.md) and [@react-native-ohos/react-native-safe-area-context](/zh-cn/react-native-safe-area-context.md) to add it to your project. + +into project and input command: + +#### **npm** + +```bash +npm install @react-native-ohos/react-native-router-flux + +# 0.72 +npm install react-native-screens@3.34.0 +npm install @react-navigation/drawer@^6.7.2 +npm install @react-navigation/bottom-tabs@^6.6.1 +npm install @react-navigation/stack@6.3.0 + +# 0.77 +npm install react-native-screens@4.8.1 +npm install @react-navigation/drawer@^7.1.17 +npm install @react-navigation/bottom-tabs@^7.1.0 +npm install @react-navigation/stack@7.2.10 +``` + +#### **yarn** + +```bash +yarn add @react-native-ohos/react-native-router-flux + +# 0.72 +yarn add @react-native-oh-tpl/react-native-screens@^3.34.0-rc.1 +yarn add @react-navigation/drawer@^6.7.2 +yarn add @react-navigation/bottom-tabs@^6.6.1 +yarn add @react-navigation/stack@6.3.0 + +# 0.77 +yarn add @react-native-ohos/react-native-screens@4.8.1-rc.4 +yarn add @react-navigation/drawer@^7.1.17 +yarn add @react-navigation/bottom-tabs@^7.1.0 +yarn add @react-navigation/stack@7.2.10 +``` + +The following code shows the basic use scenario of the repository: + +> [!WARNING] The name of the imported repository remains unchanged. + +```js +import React from 'react'; +import { Router, Stack, Scene, Actions } from 'react-native-router-flux'; +import { View, Text, Button, StyleSheet } from 'react-native'; + +const HomeScreen = () => ( + + home + welcome use react-native-router-flux + + +