Answer the question
In order to leave comments, you need to log in
Refactoring new Vue() in vue 3?
Hello!
We decided to migrate from vue-2 to vue-3, but found this thing in a large component that is often used:
import table from './table.js'
export default {
data() { return {table: null}},
beforeCreate() {
this.table = new Vue(table);
},
provide() {
return {
table: this.table
};
},
}
this.table
. Answer the question
In order to leave comments, you need to log in
Try the documentation:
https://v3-migration.vuejs.org/breaking-changes/gl...
https://vuejs.org/api/application.html#createapp
(and I would reconsider the approach with creating a new application inside the component )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question