Discussion icon indicating copy to clipboard operation
Discussion copied to clipboard

Initialise component that does not have a template?

Open iamvitali opened this issue 7 years ago • 2 comments

Hi, Is there a way to initialise a component that has no template (but has props and everything)?

I'm using it mostly for API stuff, so have 2 template components that are using this API component and I would like to pass props to it and use the $emit & $on to get data when the API call launches/gets results.

iamvitali avatar Jul 31 '17 13:07 iamvitali

image

LinusBorg avatar Jul 31 '17 14:07 LinusBorg

Yes, just return null in render function could do the trick: https://jsfiddle.net/jingkaizhao/r7d058ve/.

Um...but isn't mixin more suitable for your case?

jkzing avatar Jul 31 '17 14:07 jkzing