mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
docs(create-with-equality-fn.md): fix typos in event handler type definitions (#2947)
This commit is contained in:
parent
524a7b5d55
commit
2fbb477508
@ -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 })
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user