Current rating: {{rating}}
Passing strings, numbers and booleans is useful, but component's possibility to trigger events allows for a whole lot new possibilities.
In above demo, after changing rating, the current value will be displayed. This value is passed using event from Vue components $emit.
{{HTML}}
<template>
{{vueTemplate}}
</template>
<script>
{{vueScript}}
</script>
const demoEventElement = document.getElementsByTagName('demo-events')[0];
demoEventElement.addEventListener('change', (event) => { console.info('[Event]', event.detail); });
<template>
{{vueTemplateUsage}}
</template>
<script>
{{vueScriptUsage}}
</script>