Skip to content

Commit 82a4be1

Browse files
authored
docs: add translate in /reference/react/apis.md (#1779)
2 parents 7ffbfdb + 0826498 commit 82a4be1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/reference/react/apis.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ translators:
2121

2222
---
2323

24-
## Resource APIs {/*resource-apis*/}
24+
## 资源 API {/*resource-apis*/}
2525

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 中读取样式信息。
2727

28-
To read a value from a resource, use this API:
28+
要从资源中读取一个值,使用以下 API
2929

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).
30+
* [`use`](/reference/react/use) 让你读取资源的值,比如:[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [context](/learn/passing-data-deeply-with-context).
3131
```js
3232
function MessageComponent({ messagePromise }) {
3333
const message = use(messagePromise);

0 commit comments

Comments
 (0)