Views: 2993
Last Modified: 27.04.2022

Changes introduced to Vue application methods:

  • Vue.component() => application.component()
  • Vue.directive() => application.directive()
  • Vue.mixin() => application.mixin()
  • Vue.config() => application.config()
  • Vue.use() => application.use() (learn more in Vue documentation)
  • Vue.extend() => is no longer supported

Changes in Vue global methods:

  • Vue.nextTick => nextTick
  • Vue.observable => reactive
  • and etc.

Previously you can notice in examples, that now you are exporting a function you require instead of a Vue class during import.

Let's overview the example with nextTick:

Before:

import { Vue } from 'vue';

Vue.nextTick(() => {
  ...
});

Now:

import { nextTick } from 'ui.vue3';

nextTick(() => {
  ...
});

You can find more details in the migration guide.





Courses developed by Bitrix24