I'm in the process of migrating my Vue 2 syntax to Vue 3 and running into an issue with the following error message:
TypeError: Vue is not a constructor.
Here's my current code using Vue 3:
let app;
firebase.auth().onAuthStateChanged(user => {
console.log("user", user);
if (!app) {
app = new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");
}
});
To successfully migrate to Vue 3, I need to make the following changes:
import { createApp } from "vue";
const app = createApp({
});
app.mount("#app");