<script lang="ts">
import { createComponent } from "@vue/composition-api";
import { SplashPage } from "../../lib/vue-viewmodels";
export default createComponent({
async setup(props, context) {
await SplashPage.init(2000, context.root.$router, "plan", "login");
}
});
</script>
ERROR: "setup" must return a "Object" or a "Function", got "Promise"
the async setup requires using Suspense which doesn't exist in Vue 2. The async setup is only available in Vue 3
Thanks for your reply.
Most helpful comment
the async setup requires using
Suspensewhich doesn't exist in Vue 2. The async setup is only available in Vue 3