Skip to content

Commit d0992f5

Browse files
XleineYucohnyliu-jin-yi
authored
docs(cn): translate reference/react/apis into Chinese (#1175)
Co-authored-by: Yucohny <[email protected]> Co-authored-by: liu-jin-yi <[email protected]>
1 parent e56579a commit d0992f5

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/content/reference/react/apis.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
2-
title: "Built-in React APIs"
2+
title: 内置的 React API
3+
translators:
4+
- loveloki
5+
- Yucohny
36
---
47

58
<Intro>
69

7-
In addition to [Hooks](/reference/react) and [Components](/reference/react/components), the `react` package exports a few other APIs that are useful for defining components. This page lists all the remaining modern React APIs.
10+
除了 [Hooks](/reference/react) [Components](/reference/react/components) 之外,`react` 包还导出了一些其他的 API,这些 API 对于创建组件非常有用。本页面将介绍这些剩余的 React API。
811

912
</Intro>
1013

1114
---
1215

13-
* [`createContext`](/reference/react/createContext) lets you define and provide context to the child components. Used with [`useContext`.](/reference/react/useContext)
14-
* [`forwardRef`](/reference/react/forwardRef) lets your component expose a DOM node as a ref to the parent. Used with [`useRef`.](/reference/react/useRef)
15-
* [`lazy`](/reference/react/lazy) lets you defer loading a component's code until it's rendered for the first time.
16-
* [`memo`](/reference/react/memo) lets your component skip re-renders with same props. Used with [`useMemo`](/reference/react/useMemo) and [`useCallback`.](/reference/react/useCallback)
17-
* [`startTransition`](/reference/react/startTransition) lets you mark a state update as non-urgent. Similar to [`useTransition`.](/reference/react/useTransition)
16+
* [`createContext`](/reference/react/createContext) API 可以创建一个 context,你可以将其提供给子组件,通常会与 [`useContext`](/reference/react/useContext) 一起配合使用。
17+
* [`forwardRef`](/reference/react/forwardRef) 允许组件将 DOM 节点作为 ref 暴露给父组件。
18+
* [`lazy`](/reference/react/lazy) 允许你延迟加载组件,直到该组件需要第一次被渲染。
19+
* [`memo`](/reference/react/memo) 允许你在 props 没有变化的情况下跳过组件的重渲染。通常 [`useMemo`](/reference/react/useMemo) [`useCallback`](/reference/react/useCallback) 会一起配合使用。
20+
* [`startTransition`](/reference/react/startTransition) 允许你可以标记一个状态更新是不紧急的。类似于 [`useTransition`](/reference/react/useTransition)

0 commit comments

Comments
 (0)