diff --git a/packages/docs/core-concepts/state.md b/packages/docs/core-concepts/state.md index 4121de0e4d..4d314ab0d7 100644 --- a/packages/docs/core-concepts/state.md +++ b/packages/docs/core-concepts/state.md @@ -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' })