diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md new file mode 100644 index 0000000000000000000000000000000000000000..dd91674c4b1e59b6cfdb8ec5f25ea88fa17c44ae --- /dev/null +++ b/en/react-native-oh-tpl-react-native-screens.md @@ -0,0 +1,368 @@ +> Template version: v0.2.2 + +

+

@react-native-oh-tpl/react-native-screens

+

+

+ + Supported platforms + + + License + +

+ + +> [!TIP] [GitHub address](https://github.com/software-mansion/react-native-screens) + +## Installation and Usage + +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. + +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. + +Go to the project directory and execute the following instruction: +#### **npm** + +```bash +npm install @react-native-oh-tpl/react-native-screens +``` + +#### **yarn** + +```bash +npm install @react-native-oh-tpl/react-native-screens +``` + +The following code shows the basic use scenario of the repository: + +> [!WARNING] The name of the imported repository remains unchanged. + +```js +import * as React from 'react'; +import { Button, View } from 'react-native'; +import { NavigationContainer } from '@react-navigation/native'; +import { createNativeStackNavigator } from '@react-navigation/native-stack'; +import { enableScreens } from "react-native-screens"; +enableScreens(true); + +function HomeScreen({ navigation }) { + return ( + +