diff --git a/docs/apis/create-with-equality-fn.md b/docs/apis/create-with-equality-fn.md index 3770c2b4ac..1056de909c 100644 --- a/docs/apis/create-with-equality-fn.md +++ b/docs/apis/create-with-equality-fn.md @@ -558,7 +558,7 @@ const usePersonStore = createWithEqualityFn()( 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) { + function handleFirstNameChange(e: ChangeEvent) { setPerson({ ...person, firstName: e.target.value }) } - function handleLastNameChange(e: ChangeEvent) { + function handleLastNameChange(e: ChangeEvent) { setPerson({ ...person, lastName: e.target.value }) } - function handleEmailChange(e: ChangeEvent) { + function handleEmailChange(e: ChangeEvent) { setPerson({ ...person, email: e.target.value }) } diff --git a/docs/apis/shallow.md b/docs/apis/shallow.md index a21f539c73..56c9c67785 100644 --- a/docs/apis/shallow.md +++ b/docs/apis/shallow.md @@ -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