I want to share simple data between all components
I know it can be done using Vuex
or a global variable as a state, but it's overkill for my project!
Here is the code:
Vue.mixin({
data: function () {
return {
base_url: 'http://test.develop/api/v1/',
isLoading : false
}
}
})
base_url
is constant and its working but isLoading
must be reactive and it is not working, when I change it in one component and log it in another, it remains unchanged.
Now my question is what kind of data should be used in vue mixins ? Are mixins only for sharing code or data can be shared by mixins too?