Discussion
Discussion copied to clipboard
Initialise component that does not have a template?
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.
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?