composition-api
composition-api copied to clipboard
"Failed to mount component: template or render function not defined." with render inside async setup
OK-case
When i have sync setup - all is OK
import { h } from '@vue/composition-api';
export default {
name: 'MyComponent',
setup() {
return () => h('div', [1234]);
},
};

Error-case
But... with async - it throws an error
import { h } from '@vue/composition-api';
export default {
name: 'MyComponent',
async setup() {
return () => h('div', [1234]);
},
};

Since Vue 2 has no experimental Suspense i don't know what to do
I found Suspense for Vue 2 Should I use it or there is another solution?
UPD: It doesn't work well (
Found this trick

Earlier i used the same but thought it's not a good workaround If there aren't any another solutions - issue can be closed :)
Stale issue message