Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

useMemo inside useState in example

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

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

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
mobile

調査の方向性

example/src/hook/useNavigationPanel.ts から始め、issue で useState の初期化子として関連付けられている useMemo 呼び出しを確認します。その初期化子を、周辺の hook の使用方法および example に期待される動作と比較します。初期化子の意図が明確になり、example が説明付きでそれを維持するか、要求されたより単純な形式を使用していれば完了です。

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

説明

question

Ask your Question

There's a useNavigationPanel hook in the hook folder of the example project. I was trying to get deep in how to use the react-native-pager-view and I saw this useMemo as the initializer of useState.
Is it a mistake? What kind of syntax is it and what is the reason?
As far as I know, the useState initializer executes just once before the first render and will not execute again unless the component remounts.
So if it's on purpose, then please explain it. Otherwise, I can create a PR and change it to a normal useState

主要言語
TypeScript
スター
3.4k
フォーク
476
平均マージ
4日 8時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

callstack/react-native-pager-view のほかの issue

callstack/react-native-pager-view の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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