reactjs / reactjs/react.dev

Warning about FooterLink keys in dev

オープン
#472 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
11.8k
フォーク
7.9k
平均マージ
1日 11時間
マージ済み PR(30日)
11

説明

There is a warning in the browser console when running the project in development mode. The warning can be fixed by adding a key prop to FooterLink elements here and here. If this should be fixed I will submit a PR to do so.

Warning text:

index.js:2177 Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `Footer`. See https://fb.me/react-warning-keys for more information.
    in FooterLink (at Footer.js:67)
    in Footer (at index.js:69)
    in div (at index.js:45)
    in Template (at index.js:6)
    in _default (created by ComponentRenderer)
    in ComponentRenderer (created by Route)
    in Route (created by withRouter(ComponentRenderer))
    in withRouter(ComponentRenderer) (created by Root)
    in ScrollContext (created by Route)
    in Route (created by withRouter(ScrollContext))
    in withRouter(ScrollContext) (created by Root)
    in Router (at root.js:143)
    in DefaultRouter (created by Root)
    in Root (at app.js:45)
    in AppContainer (at app.js:44)

Steps to reproduce:

  1. Checkout master branch
  2. Run yarn dev
  3. Navigate to localhost:8000 and look in the browser console

Browser: Chrome 63
OS: MacOS 10.13.1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

src/components/LayoutFooter/Footer.js を開き、67 行目と 115 行目の FooterLink 要素を確認してから、yarn dev を実行し、localhost:8000 にアクセスします。ブラウザーのコンソールに一意なキーがないことを示す警告が表示されなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react
領域
frontend
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。