Skip to content

Commit

Permalink
docs(cn): translate reference/react-dom/hooks/index into Chinese
Browse files Browse the repository at this point in the history
  • Loading branch information
Yucohny committed Oct 19, 2023
1 parent ab1c455 commit 842dd9d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/content/reference/react-dom/hooks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "React DOM Hooks"

<Intro>

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 不支持非浏览器环境,如 iOSAndroid Windows 应用程序。如果正在寻找在 web 浏览器以及其他环境中支持的 Hook,请参阅 [React Hooks 页面](/reference/react)。该页面列出了 `react-dom` 包中的所有 Hook。

</Intro>

Expand All @@ -14,14 +14,14 @@ The `react-dom` package contains Hooks that are only supported for web applicati

<Canary>

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) 的信息。

</Canary>

*Forms* let you create interactive controls for submitting information. To manage forms in your components, use one of these Hooks:
**Forms** 允许创建用于提交信息的交互式控件。要在组件中管理表单,请使用以下其中一个 Hooks

* [`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 }) {
Expand All @@ -41,7 +41,7 @@ function Button() {
const { pending } = useFormStatus();
return (
<button disabled={pending} type="submit">
Submit
提交
</button>
);
}
Expand Down

0 comments on commit 842dd9d

Please sign in to comment.