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
}),
})),
)