From 4f9d7f45bd000144a01218796d3e0e1872fb935a Mon Sep 17 00:00:00 2001 From: Pieter <44448043+PieterDePauw@users.noreply.github.com> Date: Wed, 31 May 2023 01:14:48 +0200 Subject: [PATCH 1/2] Small inconsistency in updating-arrays-in-state.md fixed This in-text code snippet in the text mentions a function named "updateMyTodos". However, this function name does not actually exist in the interactive code example to which the code snippet seems to refer. Instead, the function name in this code snippet should probably be changed to "updateMyList" which refers to a function that does exist in the example, to improve the consistency. This is likely a tiny error. --- src/content/learn/updating-arrays-in-state.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/updating-arrays-in-state.md b/src/content/learn/updating-arrays-in-state.md index 45c6b70dc87..016c33086fb 100644 --- a/src/content/learn/updating-arrays-in-state.md +++ b/src/content/learn/updating-arrays-in-state.md @@ -766,7 +766,7 @@ function ItemList({ artworks, onToggle }) { Note how with Immer, **mutation like `artwork.seen = nextSeen` is now okay:** ```js -updateMyTodos(draft => { +updateYourList(draft => { const artwork = draft.find(a => a.id === artworkId); artwork.seen = nextSeen; }); From 976f1cd7126f5dcf5ca293ba231f5e35db4eaca7 Mon Sep 17 00:00:00 2001 From: Pieter <44448043+PieterDePauw@users.noreply.github.com> Date: Wed, 31 May 2023 01:41:10 +0200 Subject: [PATCH 2/2] Update updating-arrays-in-state.md Added an indefinite article ("a") before the noun --- src/content/learn/updating-arrays-in-state.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/updating-arrays-in-state.md b/src/content/learn/updating-arrays-in-state.md index 016c33086fb..43dbcfd3007 100644 --- a/src/content/learn/updating-arrays-in-state.md +++ b/src/content/learn/updating-arrays-in-state.md @@ -763,7 +763,7 @@ function ItemList({ artworks, onToggle }) { -Note how with Immer, **mutation like `artwork.seen = nextSeen` is now okay:** +Note how with Immer, a **mutation like `artwork.seen = nextSeen` is now okay:** ```js updateYourList(draft => {