Skip to content

Commit ed0188a

Browse files
committed
Fix typo in solution to third challenge problem in 'コンポーネントを純粋に保つ'
Fixes #800 Correct the phrase '発生していることがわかるでしょ。' to '発生していることがわかるでしょう。' in the solution to the third challenge problem in 'コンポーネントを純粋に保つ'.
1 parent afc9a16 commit ed0188a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/keeping-components-pure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ li {
675675

676676
<Solution>
677677

678-
時計が更新されるたびに、"Create Story" が *2 回*追加されることに気づくと、レンダー中にミューテーションが発生していることがわかるでしょ。Strict Mode は、このような問題をより目立たせるために、コンポーネントを 2 回呼び出します。
678+
時計が更新されるたびに、"Create Story" が *2 回*追加されることに気づくと、レンダー中にミューテーションが発生していることがわかるでしょう。Strict Mode は、このような問題をより目立たせるために、コンポーネントを 2 回呼び出します。
679679

680680
問題は `StoryTray` 関数が純粋でないことです。受け取った `stories` 配列(props の一部です)に `push` を呼び出すことで、`StoryTray` がレンダーし始める*前に*作成されたオブジェクトをミューテートしてしまっています。これにより、バグや予測困難な動作につながります。
681681

0 commit comments

Comments
 (0)