react-navigation / react-navigation/react-navigation.github.io
How to add type annotaion for custom header props.
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 324
- フォーク
- 2k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I have created a custom header for Drawer Navigator. I have used DrawerHeaderProps for its prop type, but this does not give strict type-checking behavior like what we get when we use DrawerScreenProps<HomeDrawerParamList, 'Home'>. I was unable to find any documentation for this particular thing. I thought about extending DrawerHeaderProps with the navigation property type as extended type of CompositeScreenProps. Is it a good idea to do it this way? Or should I use the useNavigation hook instead?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、カスタムヘッダーと型付きナビゲーションに関する既存の Drawer Navigator および TypeScript のドキュメントを確認します。DrawerHeaderProps と DrawerScreenProps、CompositeScreenProps、useNavigation の関係を明確にし、推奨されるアプローチと、代表的な型チェックの例をドキュメント化します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native, typescript
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100