Cleaner slug-availability debounce pattern under react-hooks v7
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- react, typescript
調査の方向性
apps/web/src/screens/ProjectEdit.tsx と pull request #38 の関連するコンテキストから始めます。列挙されている debounce、useEffectEvent、対象を絞ったルール例外の各オプションを比較し、選択したアプローチが slug チェックを維持し、hooks lint 違反を導入せずに「Checking…」インジケーターを直ちに表示することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Follow-up from #38 (authoring-screens).
In apps/web/src/screens/ProjectEdit.tsx, the debounced slug-availability check now sets setSlugAvailability('checking') inside the setTimeout callback rather than at the start of the effect. That's because eslint-plugin-react-hooks v7's set-state-in-effect rule flags every setState reachable from the effect body. The pattern still works, but the visual 'Checking…' indicator is delayed by the debounce (400ms) rather than appearing immediately after typing.
Options
- Add a small
useDebouncehook that owns its own state and emits a debounced value the effect can react to without setting state synchronously - Use
useEffectEvent(still experimental) once it lands stable - Mark the early
setSlugAvailability('checking')with a targetedeslint-disableif we decide the UX win is worth the rule exception
Either way, low-priority polish — the form is fully functional today.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 25
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeForPhilly/codeforphilly-ng のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
MarkdownEditor toolbar: use Radix Toolbar from radix-ui instead of the hand-rolled roving tabindex オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
CodeForPhilly/codeforphilly-ng の issue をすべて見る
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100