Explore Library
Code QuizAdvanced

Passing Props to a Component

Spot the common mistake in how this component reads the prop it was given.

Codejavascript
function Greeting(name) {
  return <h1>Hello, {name}!</h1>;
}

export default function App() {
  return <Greeting name="Sara" />;
}

What is the bug that prevents "Hello, Sara!" from rendering correctly?