From 323fd2746f0cb404a250bbfe7d5b9174f1f83c97 Mon Sep 17 00:00:00 2001 From: ding_chengjie Date: Wed, 16 Apr 2025 20:52:49 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#IC1PZ1]:=20=E8=BF=98?= =?UTF-8?q?=E5=8E=9Freact-native-screens=E6=96=87=E6=A1=A3=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E5=B9=B6=E6=96=B0=E5=A2=9Ereact-native-oh-tp?= =?UTF-8?q?l-react-native-screens=E9=B8=BF=E8=92=99=E5=8C=96=E7=9A=84?= =?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 --- ...eact-native-oh-tpl-react-native-screens.md | 368 +++++++++++++++++ en/react-native-screens.md | 376 ++++------------- ...eact-native-oh-tpl-react-native-screens.md | 372 +++++++++++++++++ zh-cn/react-native-screens.md | 381 ++++-------------- 4 files changed, 908 insertions(+), 589 deletions(-) create mode 100644 en/react-native-oh-tpl-react-native-screens.md create mode 100644 zh-cn/react-native-oh-tpl-react-native-screens.md 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 00000000..dd91674c --- /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 ( + +