diff --git a/en/react-native-router-flux.md b/en/react-native-router-flux.md new file mode 100644 index 0000000000000000000000000000000000000000..f6ff56aeffe463154ae98e085fa46059de416047 --- /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 + + +