From 50f546b317ae9b64c3e17afc778574e421585451 Mon Sep 17 00:00:00 2001 From: hobermin Date: Wed, 8 Jan 2025 16:55:30 +0900 Subject: [PATCH 1/2] docs(create-with-equality-fn.md): fix typos in event handler type definitions --- docs/apis/create-with-equality-fn.md | 8 ++++---- docs/apis/shallow.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/apis/create-with-equality-fn.md b/docs/apis/create-with-equality-fn.md index 3770c2b4ac..7ecfeff445 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 From e955c521e0808f26c6c46270aaf254e3e56e98fd Mon Sep 17 00:00:00 2001 From: hobermin Date: Wed, 8 Jan 2025 17:04:48 +0900 Subject: [PATCH 2/2] fix(build): lint Error --- docs/apis/create-with-equality-fn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apis/create-with-equality-fn.md b/docs/apis/create-with-equality-fn.md index 7ecfeff445..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: (nextPerson) => set({ person: nextPerson }) + setPerson: (nextPerson) => set({ person: nextPerson }), }), shallow, )