Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cn): Fix an inaccurate translation #1630

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/learn/passing-data-deeply-with-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ Context 不局限于静态值。如果你在下一次渲染时传递不同的值

#### 用 context 替代逐层 props {/*replace-prop-drilling-with-context*/}

在这个示例中,切换复选框状态会修改传入每个 `<PlaceImage>` 的 `imageSize` 参数。复选框的 state 保存在顶层的 `App` 组件中,但是每个 `<PlaceImage>` 都需要注意它
在这个示例中,切换复选框状态会修改传入每个 `<PlaceImage>` 的 `imageSize` 参数。复选框的 state 保存在顶层的 `App` 组件中,但是每个 `<PlaceImage>` 都需要知晓它的值

目前,`App` 将 `imageSize` 传递给 `List`,`List` 再将其传递给每个 `Place`,`Place` 又将其传递给 `PlaceImage`。移除 `imageSize` 参数,并在 `App` 组件中直接将其传递给 `PlaceImage`。

Expand Down
Loading