reactjs / reactjs/react-docgen

Infer displayName from function/class/variable name

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

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

custom-handler improvement
主要言語
TypeScript
スター
3.8k
フォーク
316
平均マージ
5時間 7分
マージ済み PR(30日)
4

説明

Is there a reason this wasn’t already included? Having a displayName with each description would be beneficial for tools that are using docgen without having to re-read the js file to detect the display name again.

This wasn’t that big of a deal with React.createClass or class extends React.Component since those are pretty limited call sites, but the stateless function components can get a bit gnarly in trying to infer their display names. The detection for these are already pretty solid in the #28 branch.

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

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

はじめの一歩

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

調査の方向性

#28 ブランチのステートレス関数コンポーネント名の検出から始め、docgen が各説明をどのように構築しているかを追跡します。推測された関数名、クラス名、または変数名が displayName の値になり得る箇所を特定し、続いてツールが JS ファイルを再読み込みせずにそれらを利用できることを確認します。サポートされるコンポーネント形式ごとに、推測された displayName が各説明に含まれる状態になれば完了です。

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

評価

技術スタック
react, typescript
領域
documentation
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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