Skip to content

Commit

Permalink
docs(create-with-equality-fn.md): fix typos in event handler type def…
Browse files Browse the repository at this point in the history
…initions (#2947)
  • Loading branch information
HoberMin authored Jan 8, 2025
1 parent 524a7b5 commit 2fbb477
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/apis/create-with-equality-fn.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ const usePersonStore = createWithEqualityFn<PersonStore>()(
lastName: 'Hepworth',
email: '[email protected]',
},
setPerson: (person) => set({ person }),
setPerson: (nextPerson) => set({ person: nextPerson }),
}),
shallow,
)
Expand All @@ -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 })
}

Expand Down
4 changes: 2 additions & 2 deletions docs/apis/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2fbb477

Please sign in to comment.