"Failed to mount component: template or render function not defined." with render inside async setup
dimaaan21 opened this issue · comments
Dmitry commented
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
Dmitry commented
I found Suspense for Vue 2
Should I use it or there is another solution?
UPD: It doesn't work well (
Dmitry commented
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 :)
github-actions commented
Stale issue message