Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs/core-concepts/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ cartStore.$subscribe((mutation, state) => {
Under the hood, `$subscribe()` uses Vue's `watch()` function. You can pass the same options as you would with `watch()`. This is useful when you want to immediately trigger subscriptions after **each** state change:

```ts{4}
cartStore.$subscribe((state) => {
cartStore.$subscribe((mutation, state) => {
// persist the whole state to the local storage whenever it changes
localStorage.setItem('cart', JSON.stringify(state))
}, { flush: 'sync' })
Expand Down