Consider this Astro component that receives props and composes another component. What will be the rendered output?
---
const { title } = Astro.props;
---
<h1>{title}</h1>
<Child message="Hello from parent" />
---
const { message } = Astro.props;
---
<p>{message}</p>Remember how props are passed and used inside Astro components.
The parent component receives a prop title and passes a fixed string prop message to the child. The output shows the title inside <h1> and the message inside <p>.
Given this Astro component structure, what will the nested component receive as its info prop?
---
const { data } = Astro.props;
---
<Wrapper info={data} />
---
const { info } = Astro.props;
---
<Nested info={info + ' updated'} />
---
const { info } = Astro.props;
---
<p>{info}</p>Check how the info prop is modified before passing to the nested component.
The data prop is passed as info to Wrapper. Then Wrapper appends ' updated' before passing it to Nested. So the nested component receives the original data string plus ' updated'.
Choose the correct syntax to pass name and age props to a child component in Astro.
--- const name = 'Alice'; const age = 30; --- <Child ??? />
Remember how to pass multiple props without commas or semicolons in JSX-like syntax.
In Astro, props are passed like JSX attributes separated by spaces without commas or semicolons. Option A is correct syntax.
Look at this Astro component code. Why does the child component not display the passed text prop?
---
const { text } = Astro.props;
---
<Child text="{text}" />
---
const { text } = Astro.props;
---
<p>{text}</p>Check how props are passed inside JSX-like syntax in Astro.
Using quotes around {text} passes the literal string '{text}' instead of the variable value. Remove quotes to pass the variable.
In Astro, if a parent component receives props and passes them down to multiple nested components, how are props forwarded and merged?
Choose the most accurate description.
Think about how data flows in component trees in Astro.
Astro requires explicit prop passing at each component level. It does not auto-forward or merge props automatically. This keeps data flow clear and predictable.
