reactjs / reactjs/react-docgen

Better support for custom types

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

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

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

説明

This is more of a "would you be willing to accept a pull request which does this?" question than an issue of sorts. :)

I would really like to extend the functionality of "custom" types so that:

  1. We support destructured imports (Eg. PropTypes.array - note the lack of React.)
  2. We allow common react-esque prop type function patterns to be picked up with custom props in the same way that arrayOf is currently handled. (Eg. PropTypes.iterableOf(PropTypes.record(User)))

Basically I feel the library should be able to support custom user prop types in such a way we don't have to reparse the raw value which would mean anyone can easily implement simple custom prop types and create documentation from that.

Custom prop types are super useful in building a real-world app with React and so I would like to see how we can help developers document these too.

We, at Lystable, want to build an open living component docs solution and are hoping react-docgen can feature at the core!

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

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

はじめの一歩

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

調査の方向性

ファイル、テスト、エントリポイントのいずれも指定されていません。まず、既存の custom prop-type の処理と arrayOf を処理するコードパスを見つけ、次に分割代入されたインポートとネストされたカスタム関数がどのように表現されているかを確認してください。指定された例をカバーし、元の値を再解析せずに、要求された両方のパターンが文書化されていれば完了です。

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

評価

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

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

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