[Vuejs]-Vue js emit between three components?

0๐Ÿ‘

You can use EventBus implementation in Vue. You would emit an event from methods (or anywhere you want) in one component and you would register listeners during the lyfecycle hooks of other components.

0๐Ÿ‘

$emit events should not be camel case. Use kebab case instead.

try:

@click="$emit('set-movie', movieKey)

and then in carousel:

@set-movie="$emit('set-movie', movieKey)

and in parent

@set-movie="test"

Leave a comment