Skip to content

Commit

Permalink
Update beta/src/content/learn/conditional-rendering.md
Browse files Browse the repository at this point in the history
  • Loading branch information
awxiaoxian2020 authored Mar 1, 2023
1 parent fc8ba20 commit 2a73dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beta/src/content/learn/conditional-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ export default function DrinkList() {

</Sandpack>

这个例子中,每种饮品的信息是放在一起的,而不是分散到多个条件判断里。这会使得以后增加更多的饮品更加容易
这个例子中,每种饮品的信息是放在一起的,而没有将其分散到多个条件判断里。这会让我们以后可以更容易地增加更多的饮品

还可以通过将饮品信息存入对象中,从而去掉所有的条件判断语句:

Expand Down

0 comments on commit 2a73dc8

Please sign in to comment.