Greet by Name
Write the code, see it run, pass the checks.
The problem
- easy
- Code
Make the Greeting component greet whoever it's given in its name prop, in a heading. The checks render it twice: <Greeting name="Ada" /> must show "Hello, Ada!", and <Greeting /> (no name) must show "Hello, stranger!". The preview shows <Greeting /> with no name.
Your code must pass
- <Greeting name="Ada" /> shows "Hello, Ada!"
- <Greeting /> with no name shows "Hello, stranger!"