Description

Solution

Submissions

Component Props

React
Junior
Functional componentsProps

Requirements:

  • Add a name prop to the Greeting component.
  • Display that prop inside Greeting.
  • Pass "TechPrep" from App so the page shows Hello, TechPrep!
App.js
import Greeting from "./Greeting";

export default function App() {
  return (
    <div className="App p-3">
      <Greeting />
    </div>
  );
}

Browser

Console

Test Cases

Submit

JavaScript Console

console.log()
statements will appear here

Run Tests

Click the 'Run' button below to run the tests
in the run.test.js file

Submit

Click the 'Submit' button below to submit your solution

Open browser consoleTests