docs(create-with-equality-fn.md): fix typos in event handler type definitions (#2947)

This commit is contained in:
HoberMin 2025-01-08 21:49:47 +09:00 committed by GitHub
parent 524a7b5d55
commit 2fbb477508
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -558,7 +558,7 @@ const usePersonStore = createWithEqualityFn<PersonStore>()(
lastName: 'Hepworth',
email: 'bhepworth@sculpture.com',
},
setPerson: (person) => set({ person }),
setPerson: (nextPerson) => set({ person: nextPerson }),
}),
shallow,
)
@ -567,15 +567,15 @@ export default function Form() {
const person = usePersonStore((state) => state.person)
const setPerson = usePersonStore((state) => state.setPerson)
function handleFirstNameChange(e: ChangeEvent<HTLMInputElement>) {
function handleFirstNameChange(e: ChangeEvent<HTMLInputElement>) {
setPerson({ ...person, firstName: e.target.value })
}
function handleLastNameChange(e: ChangeEvent<HTLMInputElement>) {
function handleLastNameChange(e: ChangeEvent<HTMLInputElement>) {
setPerson({ ...person, lastName: e.target.value })
}
function handleEmailChange(e: ChangeEvent<HTLMInputElement>) {
function handleEmailChange(e: ChangeEvent<HTMLInputElement>) {
setPerson({ ...person, email: e.target.value })
}

View File

@ -78,8 +78,8 @@ shallow(booleanLeft, booleanRight) // -> true
const bigIntLeft = 1n
const bigIntRight = 1n
Object.is(bigInLeft, bigInRight) // -> true
shallow(bigInLeft, bigInRight) // -> true
Object.is(bigIntLeft, bigIntRight) // -> true
shallow(bigIntLeft, bigIntRight) // -> true
```
### Comparing Objects