Browse Source

Fix typo in Removing from an array part (#4171)

main
Ahmet Faruk Yılmaz 3 years ago
committed by GitHub
parent
commit
ee304b6aae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      beta/src/pages/learn/updating-arrays-in-state.md

4
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
</Solution>
</Challenges>
</Challenges>

Loading…
Cancel
Save