coryhouse / coryhouse/react-restaurant-scriptpro

Autofocus first admin input with useRef

Open Beginner friendly
#31 0 comments 0 reactions 0 assignees View on GitHub
enhancement phase-6-admin-forms
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Goal
When the admin form mounts, automatically focus the first input via `useRef`. Teaches `useRef` for DOM access vs. holding state.

## Acceptance criteria
- [ ] `useRef` is wired to the first input
- [ ] First input is focused on mount
- [ ] No re-renders triggered by the ref

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the admin form and its first input, then read the surrounding component to see how it mounts. Wire the typed ref and verify that the first input is focused on mount without the ref triggering re-renders; the acceptance criteria define when the work is done.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.