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

This commit is contained in:
Ahmet Faruk Yılmaz
2021-12-14 09:34:48 +03:00
committed by GitHub
parent 014f4890dc
commit ee304b6aae

View File

@@ -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>