Usage with computed property and <component> #6
-
First of all, apologies. I was going to post this on StackOverflow but the tag 'vue3-sfc-loader' has not been created and I didn't have enought reputation to create it. This felt like the next best place to ask (beg!) for help... I'm starting a new project and decided to give Vue3 a bash. I've used
I'm really unclear on how this would work with the new library. So far I have the following:
This results in an error:
To clarify my component, just for testing purposes, consists of a template:
Ultimately, I guess I'm unsure on how to handle the I've experimented a bit and saw that amending the
I got (possibly!) closer to where I want to be but with a new error:
Any help appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hello titantwentyone, The new github discussions tab is also a good place to ask questions (I will add this in the readme.md)!
|
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back to me. I've been getting my head around
Hopefully you think this is okay but please tell me if there is a better way, Thanks again for your help. |
Beta Was this translation helpful? Give feedback.
Thanks for getting back to me. I've been getting my head around
defineAsyncComponent
which is where my confusion was. My computed method only needs to return a string really. My other issue was getting hold of the main App object so assigned this to window.app and of course, failing to add a reference to Vue. (I've only delved into Vue a few times but planning on really understanding "the innards" this time - seeemed sensible to start with Vue3!). For reference, if anyone comes here for the same thing, my solution was: