Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cleaner slug-availability debounce pattern under react-hooks v7

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Quiet
Tech stack
react, typescript
Domain
frontend, tooling

Research direction

Start with apps/web/src/screens/ProjectEdit.tsx and the related context in pull request #38. Compare the listed debounce, useEffectEvent, and targeted rule-exception options, then verify the chosen approach preserves the slug check and makes the “Checking…” indicator appear immediately without introducing the hooks lint violation.

Written by the indexing model from the issue text.

Description

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 useDebounce hook 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 targeted eslint-disable if we decide the UX win is worth the rule exception

Either way, low-priority polish — the form is fully functional today.

Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
1d 20h
Merged PRs (30d)
25

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeForPhilly/codeforphilly-ng

All issues in CodeForPhilly/codeforphilly-ng

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.