I don't understand when should this be used this.$root.$on('text', this.method);}, and what is meant by $root and $on
also its difference with this.$root.$emit isn't clear for me
$root is your vue app.
$on are your event listeners.
$emit is the event emitter method
so if you define this.$root.$on('foo' (arg)=>console.log(arg))
and then emit this.$root.$emit('foo', 'emitted event foo')
console will print emitted event foo