mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
Fix typo in Removing from an array part (#4171)
This commit is contained in:
committed by
GitHub
parent
014f4890dc
commit
ee304b6aae
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user