Complete the code to pass the prop name from parent to child component.
<ChildComponent [1]={name} />In Svelte, to pass data to a child component, you use the prop name as an attribute. Here, name is passed as a prop.
Complete the child component code to receive the prop title.
<script>
export [1] title;
</script>In Svelte, props are declared with export let to receive data from the parent.
Fix the error in passing a number prop count to the child component.
<Child count=[1] />To pass a number prop in Svelte, use the number directly without quotes or braces.
Fill both blanks to correctly pass and receive a prop message.
Parent: <Child [1]={message} /> Child: <script> export [2] message; </script>
The parent passes the prop as an attribute named message. The child receives it by declaring export let message.
Fill all three blanks to create a prop user passed from parent to child and used in child markup.
Parent: <Child [1]={user} /> Child: <script> export [2] user; </script> Child markup: <p>Hello, [3]!</p>
The parent passes the user prop. The child exports it with let. The child uses user.name to show the user's name.