reactjs / reactjs/react.dev

after introducing hooks this phrase is misleading

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

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

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

説明

after introducing hooks this part is misleading, as converting into class is no longer the only option, that can be used if state needed for the component

You should convert the component to a class if you need a ref to it, just like you do when you need lifecycle methods or state.

https://github.com/reactjs/reactjs.org/blob/aada3a308493614b7d5b4b438b5c345d7ecc6c53/content/docs/refs-and-the-dom.md#refs-and-function-components-refs-and-function-components

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

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

はじめの一歩

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

調査の方向性

content/docs/refs-and-the-dom.md を開き、issue でリンクされている「Refs and Function Components」セクションを読んでください。state が必要な場合に、class への変換を唯一の選択肢として提示しないよう、引用されているガイダンスを更新してから、ドキュメント内で修正後の文言を確認してください。

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

評価

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

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

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