Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,51 @@ function App(props) {
return (
<div>
{/* send in a prop called "message", give it the string "Hello World" */}
<div>This better say "Hello World": <SuperComponent /> </div>
<div>This better say "Hello World": <SuperComponent message={"Hello World"}/> </div>
{/* send in a prop called "message", give it the string "Goodbye World" */}
<div>This better say "Goodbye World": <SuperComponent /> </div>
<div>This better say "Goodbye World": <SuperComponent message={"Goodbye World"}/> </div>
{/* send in a prop called "message", give it the string "Props are awesome" */}
<div>This better say "Props are awesome": <SuperComponent /> </div>
<div>This better say "Props are awesome": <SuperComponent message={"Props are awesome"}/> </div>
{/* send in a prop called "message", give it the string "I totally get this now" */}
<div>This better say "I totally get this now": <SuperComponent /> </div>
<div>This better say "I totally get this now": <SuperComponent message={"I totally get this now"}/> </div>


{/* send in a prop called "magicNumber", give it the number 42*/}
<div>This better say 42: <SuperComponent /> </div>
<div>This better say 42: <SuperComponent magicNumber={42}/> </div>
{/* send in a prop called "magicNumber", give it the number 21*/}
<div>This better say 21: <SuperComponent /> </div>
<div>This better say 21: <SuperComponent magicNumber={21}/> </div>


{/* send in a prop called "product", give it the variable product*/}
<div>This better say "ajax": <SuperComponent /> </div>
<div>This better say "ajax": <SuperComponent product={product}/> </div>
{/* send in a prop called "product", give it an object with a name property "pepsi"*/}
<div>This better say "pepsi": <SuperComponent /> </div>
<div>This better say "pepsi": <SuperComponent product={ {name: "pepsi"} }/> </div>
{/* send in a prop called "product", give it an object with a name property "nike"*/}
<div>This better say "nike": <SuperComponent /> </div>
<div>This better say "nike": <SuperComponent product={ {name: "nike"} }/> </div>


{/* send in a prop called "names", give it the variable names*/}
<div>This better say "Bob, Stand, Todd, Ted" : <SuperComponent /> </div>
<div>This better say "Bob, Stand, Todd, Ted" : <SuperComponent names={names}/> </div>
{/* send in a prop called "names", give it an array ["Brodie","Alicia","Margo"]*/}
<div>This better say "Brodie, Alicia, Margo" : <SuperComponent /> </div>
<div>This better say "Brodie, Alicia, Margo" : <SuperComponent names={["Brodie","Alicia","Margo"]}/> </div>
{/* send in a prop called "names", give it an array ["Titus","Axel","Claire"]*/}
<div>This better say "Titus, Axel, Claire" : <SuperComponent /> </div>
<div>This better say "Titus, Axel, Claire" : <SuperComponent names={["Titus","Axel","Claire"]}/> </div>

{/* Use App's props*/}
{/* send in a prop called "products", give it the products array from App's props*/}
<div>This better say "Hand Sanitizer": <SuperComponent /> </div>
<div>This better say "Hand Sanitizer": <SuperComponent products={props.products}/> </div>
{/* send in a prop called "names", give it the names array from App's props*/}
<div>This better say "Robin, Lily, Barney": <SuperComponent /> </div>
<div>This better say "Robin, Lily, Barney": <SuperComponent names={props.names}/> </div>
{/* send in a prop called "magicNumber", give it the magicNumber from App's props*/}
<div>This better say "99": <SuperComponent /> </div>
<div>This better say "99": <SuperComponent magicNumber={props.magicNumber}/> </div>
{/* send in a prop called "message", give it the contact.firstName from App's props*/}
<div>This better say "Luke": <SuperComponent /> </div>
<div>This better say "Luke": <SuperComponent message={props.contact.firstName}/> </div>
{/* send in a prop called "message", give it the contact.lastName from App's props*/}
<div>This better say "Skywalker": <SuperComponent /> </div>
<div>This better say "Skywalker": <SuperComponent message={props.contact.lastName}/> </div>
{/* send in a prop called "message", give it the contact.occupation from App's props*/}
<div>This better say "farmer": <SuperComponent /> </div>
<div>This better say "farmer": <SuperComponent message={props.contact.occupation}/> </div>
{/* send in a prop called "message", give it the contact.address from App's props*/}
<div>This better say "300 MiddleOfNoWhere st Tatooine": <SuperComponent /> </div>
<div>This better say "300 MiddleOfNoWhere st Tatooine": <SuperComponent message={props.contact.address}/> </div>


</div>
Expand Down