From 9ba6a63799b2d5ff8f2680d69b642f0e0c27bc42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9A=B0=ED=98=81?= Date: Mon, 10 Mar 2025 09:10:53 +0900 Subject: [PATCH] docs: fix typos (#3042) --- docs/hooks/use-shallow.md | 6 ++++-- docs/middlewares/immer.md | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/hooks/use-shallow.md b/docs/hooks/use-shallow.md index 050eb2c9..0c3eccd2 100644 --- a/docs/hooks/use-shallow.md +++ b/docs/hooks/use-shallow.md @@ -109,7 +109,7 @@ Finally, we combine both components in the `App` component to see them in action export default function App() { return ( <> - + ) @@ -186,7 +186,9 @@ the state change: ```tsx function BearNames() { - const names = useBearFamilyStore(useShallow((state) => Object.keys(state))) + const names = useBearFamilyMealsStore( + useShallow((state) => Object.keys(state)), + ) return
{names.join(', ')}
} diff --git a/docs/middlewares/immer.md b/docs/middlewares/immer.md index 7d5bd19b..fcc0d2e4 100644 --- a/docs/middlewares/immer.md +++ b/docs/middlewares/immer.md @@ -180,7 +180,10 @@ const personStore = createStore()( }, setPerson: (nextPerson) => set((state) => { - state.person = typeof nextPerson ? nextPerson(state.person) : nextPerson + state.person = + typeof nextPerson === 'function' + ? nextPerson(state.person) + : nextPerson }), })), )