-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(cn): translate reference/react-dom/client/index into Chinese (#1171
) Co-authored-by: Xavi Lee <awxiaoxian2020@163.com> Co-authored-by: Yucohny <79147654+Yucohny@users.noreply.github.com>
- Loading branch information
1 parent
88bd35e
commit ac4509a
Showing
1 changed file
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
--- | ||
title: Client React DOM APIs | ||
title: 客户端 React DOM APIs | ||
translators: | ||
- neo-of-matrix | ||
--- | ||
|
||
<Intro> | ||
|
||
The `react-dom/client` APIs let you render React components on the client (in the browser). These APIs are typically used at the top level of your app to initialize your React tree. A [framework](/learn/start-a-new-react-project#production-grade-react-frameworks) may call them for you. Most of your components don't need to import or use them. | ||
`react-dom/client` API 让你可以在客户端(浏览器)渲染 React 组件。这些 API 通常在你的应用的顶端初始化 React 树。一个 [框架](/learn/start-a-new-react-project#production-grade-react-frameworks) 可能会为你调用它们。你的大部分组件不需要导入和使用它们。 | ||
|
||
</Intro> | ||
|
||
--- | ||
|
||
## Client APIs {/*client-apis*/} | ||
|
||
* [`createRoot`](/reference/react-dom/client/createRoot) lets you create a root to display React components inside a browser DOM node. | ||
* [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) lets you display React components inside a browser DOM node whose HTML content was previously generated by [`react-dom/server`.](/reference/react-dom/server) | ||
## 客户端 API {/*client-apis*/} | ||
|
||
* [`createRoot`](/reference/react-dom/client/createRoot) 让你可以在浏览器的 DOM 节点里面创建一个根节点来显示 React 组件。 | ||
* [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) 让你可以在 HTML 内容提前由 [`react-dom/server`](/reference/react-dom/server) 生成的浏览器 DOM 节点里面显示 React 组件。 | ||
--- | ||
|
||
## Browser support {/*browser-support*/} | ||
## 浏览器兼容性 {/*browser-support*/} | ||
|
||
React supports all popular browsers, including Internet Explorer 9 and above. Some polyfills are required for older browsers such as IE 9 and IE 10. | ||
React 支持所有流行的浏览器,包括 Internet Explorer 9 以及以上版本的浏览器。更旧的浏览器比如 IE9 和 IE10 需要使用 polyfill。 |