You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react/apis.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,13 @@ translators:
21
21
22
22
---
23
23
24
-
## Resource APIs {/*resource-apis*/}
24
+
## 资源 API {/*resource-apis*/}
25
25
26
-
*Resources* can be accessed by a component without having them as part of their state. For example, a component can read a message from a Promise or read styling information from a context.
26
+
组件可以在不将 **资源** 作为其 state 一部分的情况下访问。 例如,组件可以从 Promise 中读取消息,或从 context 中读取样式信息。
27
27
28
-
To read a value from a resource, use this API:
28
+
要从资源中读取一个值,使用以下 API:
29
29
30
-
*[`use`](/reference/react/use)lets you read the value of a resource like a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)or[context](/learn/passing-data-deeply-with-context).
0 commit comments