Hi folks!
I present you to Vue 3.x support. With Vue 3 some breaking changes happend. One of these is plugin registration. Plugin registration like below in Vue 2.x:
import VueWait from 'vue-wait'
Vue.use(VueWait)
With new version, this implementation changed with that. Let's look at example from Vuex:
import { createApp } from 'vue'
import { createStore } from 'vuex'
import App from './App.vue'
const store = createStore({
state () {
return {
count: 0
}
},
mutations: {
increment (state) {
state.count++
}
}
})
createApp(App).use(store).mount('#app');
According to new implementation, I have been added an install function for Vue 3.x. New registration looks like this:
import { createApp } from 'vue'
import { createVueWait } from 'vue-wait'
import App from './App.vue'
const VueWait = createVueWait({
useVuex: false,
registerComponent: true
});
createApp(App).use(VueWait).mount('#app');
Hi folks! I present you to Vue 3.x support. With Vue 3 some breaking changes happend. One of these is plugin registration. Plugin registration like below in Vue 2.x:
With new version, this implementation changed with that. Let's look at example from Vuex:
According to new implementation, I have been added an install function for Vue 3.x. New registration looks like this: