Skip to content

Commit

Permalink
fix: Typo in provide-inject.md (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanzhi33 committed May 18, 2024
1 parent 84ccdcc commit 3752851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guide/components/provide-inject.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Prop 逐级透传问题 {#prop-drilling}

通常情况下,当我们需要从父组件向子组件传递数据时,会使用 [props](/guide/components/props)。想象一下这样的结构:有一些多层级嵌套的组件,形成了一颗巨大的组件树,而某个深层的子组件需要一个较远的祖先组件中的部分数据。在这种情况下,如果仅使用 props 则必须将其沿着组件链逐级传递下去,这会非常麻烦:
通常情况下,当我们需要从父组件向子组件传递数据时,会使用 [props](/guide/components/props)。想象一下这样的结构:有一些多层级嵌套的组件,形成了一棵巨大的组件树,而某个深层的子组件需要一个较远的祖先组件中的部分数据。在这种情况下,如果仅使用 props 则必须将其沿着组件链逐级传递下去,这会非常麻烦:

![Prop 逐级透传的过程图示](./images/prop-drilling.png)

Expand Down

0 comments on commit 3752851

Please sign in to comment.