Skip to content

Commit

Permalink
fix(overmind-react): fix missing effect dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni authored and henri-hulski committed Mar 22, 2024
1 parent 10d5c93 commit 4adb93b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/overmind-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const useState = <Context extends IContext<{ state: {} }>>(
trackStateTree.subscribe((_, __, flushId) => {
forceRerender(flushId)
}),
[]
[trackStateTree]
)
} else {
const component = useCurrentComponent()
Expand Down Expand Up @@ -135,7 +135,7 @@ const useState = <Context extends IContext<{ state: {} }>>(

dispose()
}
}, [])
}, [trackStateTree])
}

return state
Expand Down

0 comments on commit 4adb93b

Please sign in to comment.