Skip to content

Commit f684ef3

Browse files
Yuqing ChenBetaMee
Yuqing Chen
and
BetaMee
authored
Update content/docs/context.md
Co-Authored-By: BetaMee <[email protected]>
1 parent e8b920c commit f684ef3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permalink: docs/context.html
66

77
Context 提供了一个无需手动层层传递 props 属性就能在组件树间传递数据的方法。
88

9-
在一个典型的 React 应用中,数据是通过 props 属性由上向下(由父及子)进行传递的,但这种做法对于某些类型的属性而言是极其繁琐的(例如:地区偏好,UI主题),这些属性是应用程序中许多组件都需要的。Context 提供了一种在组件之间共享此类值的方式,而不必显式地通过组件树的每个层级传递 props
9+
在一个典型的 React 应用中,数据是通过 props 属性由上向下(由父及子)进行传递的,但这种做法对于某些类型的属性而言是极其繁琐的(例如:地区偏好,UI 主题),这些属性是应用程序中许多组件都需要的。Context 提供了一种在组件之间共享此类值的方式,而不必显式地通过组件树的每个层级传递 props。
1010

1111
- [何时使用 Context](#when-to-use-context)
1212
- [使用 Context 之前的考虑](#before-you-use-context)

0 commit comments

Comments
 (0)