Skip to content

Commit b76232e

Browse files
authored
fix: correct a heading level error (#1073)
1 parent 1ca59e0 commit b76232e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

beta/src/content/learn/updating-arrays-in-state.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ updateMyTodos(draft => {
796796
797797
<Challenges>
798798
799-
### 更新购物车中的商品 {/*update-an-item-in-the-shopping-cart*/}
799+
#### 更新购物车中的商品 {/*update-an-item-in-the-shopping-cart*/}
800800
801801
填写 `handleIncreaseClick` 的逻辑,以便按下“+”时递增对应数字:
802802
@@ -923,7 +923,7 @@ button { margin: 5px; }
923923
924924
</Solution>
925925
926-
### 删除购物车中的商品 {/*remove-an-item-from-the-shopping-cart*/}
926+
#### 删除购物车中的商品 {/*remove-an-item-from-the-shopping-cart*/}
927927
928928
现在购物车有了一个正常工作的“+”按钮,但是“-”按钮却没有任何作用。你需要为它添加一个事件处理程序,以便按下它时可以减少对应商品的 `count`。如果在数字为 1 时按下按钮,商品需要自动从购物车中移除。确保商品计数永远不出现 0。
929929
@@ -1084,7 +1084,7 @@ button { margin: 5px; }
10841084
10851085
</Solution>
10861086
1087-
### 使用不会直接修改原始值的方法修复 mutation 的问题 {/*fix-the-mutations-using-non-mutative-methods*/}
1087+
#### 使用不会直接修改原始值的方法修复 mutation 的问题 {/*fix-the-mutations-using-non-mutative-methods*/}
10881088
10891089
在下面的例子中,`App.js` 中所有的事件处理程序都会产生 mutation。这导致编辑和删除待办事项的功能无法正常运行。使用不会直接修改原始值的方法重写 `handleAddTodo``handleChangeTodo``handleDeleteTodo` 这三个函数:
10901090
@@ -1417,7 +1417,7 @@ ul, li { margin: 0; padding: 0; }
14171417
</Solution>
14181418
14191419
1420-
### 使用 Immer 修复 mutation 的问题 {/*fix-the-mutations-using-immer*/}
1420+
#### 使用 Immer 修复 mutation 的问题 {/*fix-the-mutations-using-immer*/}
14211421
14221422
下面的例子和上一个挑战的相同。这次,你需要使用 Immer 来修复 mutation 的问题。为了方便,`useImmer` 已经被引入了,你需要使用它来替换 `todos` 的 state 变量。
14231423

0 commit comments

Comments
 (0)