Imagine I have a component named child
. There is some data stored there that I need to retrieve in the parent component. To accomplish this, I plan to emit an event in the childs
mount using
this.$emit('get-data', this.data)
, and then receive it in the parent mount. Is it actually achievable and practical? If so, how can one go about implementing it? If not, what are some superior alternatives?
Cheers.