coryhouse / coryhouse/react-restaurant-scriptpro
Autofocus first admin input with useRef
- 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