Skip to content

Commit

Permalink
docs: fix typos (#3042)
Browse files Browse the repository at this point in the history
  • Loading branch information
dngur9801 authored Mar 10, 2025
1 parent a90981a commit 9ba6a63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/hooks/use-shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Finally, we combine both components in the `App` component to see them in action
export default function App() {
return (
<>
<UpdateBabyBearPorridge />
<UpdateBabyBearMeal />
<BearNames />
</>
)
Expand Down Expand Up @@ -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 <div>{names.join(', ')}</div>
}
Expand Down
5 changes: 4 additions & 1 deletion docs/middlewares/immer.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ const personStore = createStore<PersonStore>()(
},
setPerson: (nextPerson) =>
set((state) => {
state.person = typeof nextPerson ? nextPerson(state.person) : nextPerson
state.person =
typeof nextPerson === 'function'
? nextPerson(state.person)
: nextPerson
}),
})),
)
Expand Down

0 comments on commit 9ba6a63

Please sign in to comment.