Skip to content

Commit

Permalink
improve thing
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed May 8, 2024
1 parent e1abdd7 commit 667d77c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exercises/05.unique-ids/01.problem.use-id/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Field({
...inputProps
}: {
label: string
} & React.InputHTMLAttributes<HTMLInputElement>) {
} & React.ComponentProps<'input'>) {
// 🐨 create a generatedId using useId
// 🐨 create an id that defaults to inputProps.id and falls back to the generatedId
return (
Expand Down
2 changes: 1 addition & 1 deletion exercises/05.unique-ids/01.solution.use-id/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Field({
...inputProps
}: {
label: string
} & React.InputHTMLAttributes<HTMLInputElement>) {
} & React.ComponentProps<'input'>) {
const generatedId = useId()
const id = inputProps.id ?? generatedId
return (
Expand Down

0 comments on commit 667d77c

Please sign in to comment.