From f3f6a8598b1c8546319b180b17cf302eebef6300 Mon Sep 17 00:00:00 2001 From: Yucohny <79147654+Yucohny@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:25:06 +0800 Subject: [PATCH] docs(cn): translate reference/react-dom/hooks/index into Chinese (#1347) Co-authored-by: Xavi Lee --- src/content/reference/react-dom/hooks/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/reference/react-dom/hooks/index.md b/src/content/reference/react-dom/hooks/index.md index 6490dc1113..15008b502e 100644 --- a/src/content/reference/react-dom/hooks/index.md +++ b/src/content/reference/react-dom/hooks/index.md @@ -4,7 +4,7 @@ title: "React DOM Hooks" -The `react-dom` package contains Hooks that are only supported for web applications (which run in the browser DOM environment). These Hooks are not supported in non-browser environments like iOS, Android, or Windows applications. If you are looking for Hooks that are supported in web browsers *and other environments* see [the React Hooks page](/reference/react). This page lists all the Hooks in the `react-dom` package. +`react-dom` 包含的 Hook 仅支持 web 应用程序,即在浏览器 DOM 环境中运行的应用程序。这些 Hook 不支持非浏览器环境,如 iOS、Android 或 Windows 应用程序。如果正在寻找在 web 浏览器以及其他环境中支持的 Hook,请参阅 [React Hooks 页面](/reference/react)。该页面列出了 `react-dom` 包中的所有 Hook。 @@ -14,14 +14,14 @@ The `react-dom` package contains Hooks that are only supported for web applicati -Form Hooks are currently only available in React's canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels). +Form Hooks 目前仅在 React canary 与 experimental 渠道中可用。在此处了解更多关于 [React 发布渠道](/community/versioning-policy#all-release-channels) 的信息。 -*Forms* let you create interactive controls for submitting information. To manage forms in your components, use one of these Hooks: +**Form** 允许创建用于提交信息的交互式控件。要在组件中管理表单,请使用以下其中一个 Hook: -* [`useFormStatus`](/reference/react-dom/hooks/useFormStatus) allows you to make updates to the UI based on the status of the a form. -* `useFormState` allows you to manage state inside a form. +* [`useFormStatus`](/reference/react-dom/hooks/useFormStatus) 允许根据表单的状态更新用户界面。 +* `useFormState` 允许管理表单内部的状态。 ```js function Form({ action }) { @@ -41,7 +41,7 @@ function Button() { const { pending } = useFormStatus(); return ( ); }