Skip to content

Commit

Permalink
Update use-store.md
Browse files Browse the repository at this point in the history
there is a typo mistake while importing the setposition from positionstore

 wrong : const setPosition = useStore(positionStore, (state) => state.setPositionStore)
correct :  const setPosition = useStore(positionStore, (state) => state.setPosition)
  • Loading branch information
legcy143 authored Oct 18, 2024
1 parent cce8d5b commit 5978125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/hooks/use-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ will use the store to track and update the dot's position.
```tsx
function MovingDot() {
const position = useStore(positionStore, (state) => state.position)
const setPosition = useStore(positionStore, (state) => state.setPositionStore)
const setPosition = useStore(positionStore, (state) => state.setPosition)

return (
<div
Expand Down Expand Up @@ -131,7 +131,7 @@ const positionStore = createStore<PositionStore>()((set) => ({

function MovingDot() {
const position = useStore(positionStore, (state) => state.position)
const setPosition = useStore(positionStore, (state) => state.setPositionStore)
const setPosition = useStore(positionStore, (state) => state.setPosition)

return (
<div
Expand Down

0 comments on commit 5978125

Please sign in to comment.