Complete the code to pass the prop from Parent to Child component.
<template> <ChildComponent [1]="message" /> </template> <script setup> const message = 'Hello from Parent!' </script>
In Vue, to pass a prop, you use the colon : shorthand before the prop name, like :msg.
Complete the Child component to declare the received prop correctly.
<script setup>
defineProps({ [1]: String })
</script>The Child component expects a prop named msg as declared in the Parent.
Fix the error in the nested component to receive the prop passed through multiple levels.
<template> <GrandChildComponent [1]="msg" /> </template>
The prop name msg must be passed down exactly as declared to the nested component.
Fill both blanks to correctly pass and declare the prop in the intermediate component.
<template> <ChildComponent [1]="msg" /> </template> <script setup> defineProps({ [2]: String }) </script>
The intermediate component passes the prop msg down and declares it with the same name.
Fill all three blanks to create a dictionary comprehension that filters and transforms props data.
const filteredProps = Object.fromEntries(Object.entries(props).filter(([[1], [2]]) => [3].startsWith('user')))
This code extracts entries from props where the value starts with 'user'. The destructuring uses key and value, and the filter checks value.