diff --git a/beta/src/pages/learn/updating-arrays-in-state.md b/beta/src/pages/learn/updating-arrays-in-state.md index 92b1f7b4..63c2a965 100644 --- a/beta/src/pages/learn/updating-arrays-in-state.md +++ b/beta/src/pages/learn/updating-arrays-in-state.md @@ -208,7 +208,7 @@ setArtists( ); ``` -Here, `artists.filter(s => s.id !== artist.id)` means "create an array that consists of those `artists` whose IDs are different from `artist.id`." In other words, each artist's "Delete" button will filter _that_ artist out of the array, and then request a re-render with the resulting array. Note that `filter` does not modify the original array. +Here, `artists.filter(a => a.id !== artist.id)` means "create an array that consists of those `artists` whose IDs are different from `artist.id`." In other words, each artist's "Delete" button will filter _that_ artist out of the array, and then request a re-render with the resulting array. Note that `filter` does not modify the original array. ### Transforming an array {/*transforming-an-array*/} @@ -1972,4 +1972,4 @@ With Immer, you can pick the style that feels the most natural for each separate - \ No newline at end of file +