I'm using below code to watch for the change in Vuex state. The store file lies in the same directory. However, it doesn't seem to work. How do I watch for state change in vuex properly?
import store from './index'
store.watch(
(store) => store.state.base_url,
() => {
console.log('Watcher works')
}
)