New array methods
オープン
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
Now that all browsers support the new array methods toSpliced(), with(), toSorted(), toReversed(), do they offer a better solution compared to the spread operator, worth documenting in the Updating Arrays in State page?
In the current docs:
const insertAt = 1; // Could be any index
const nextArtists = [
// Items before the insertion point:
...artists.slice(0, insertAt),
// New item:
{ id: nextId++, name: name },
// Items after the insertion point:
...artists.slice(insertAt)
];
Could be replaced with:
setArtists(artists.toSpliced(1, 0, { id: nextId++, name: name }));
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Updating Arrays in State ページから始め、リンクされている配列メソッドのリファレンスを確認して、toSpliced()、with()、toSorted()、toReversed() を既存のスプレッド演算子の例と比較します。これらのメソッドがより明確なガイダンスを提供するかどうかを判断し、提供する場合はページを更新すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100