-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from josemoracard/jose2-00-welcome
exercises 00-welcome to 02.2-mapping-array-of-objects-to-li
- Loading branch information
Showing
37 changed files
with
256 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from "react"; //Main React.js library | ||
import React from "react"; // Main React.js library | ||
|
||
import ReactDOM from "react-dom"; //we use ReactDOM to render into the DOM | ||
import ReactDOM from "react-dom"; // We use ReactDOM to render into the DOM | ||
|
||
// WHAT: This variable returns contains the html to render | ||
// WHAT: This variable contains the html to render | ||
let output = <span>James is 12 years old</span>; | ||
|
||
// WHERE: A DOM element that will contain the entire react generated html | ||
const myDiv = document.querySelector("#myDiv"); | ||
|
||
//what //where | ||
//what //where | ||
ReactDOM.render(output, myDiv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
|
||
// If we have a variable | ||
let age = "12"; | ||
let name = "John"; | ||
|
||
// We can use it in our html like this | ||
let output = ( | ||
<span> | ||
James is <strong>12</strong> years old | ||
</span> | ||
); | ||
|
||
// Use react-dom to render it | ||
ReactDOM.render(output, document.querySelector("#myDiv")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
|
||
// if we have a variable | ||
// If we have a variable | ||
let age = "12"; | ||
let name = "John"; | ||
|
||
// we can use it in our html like this | ||
// We can use it in our html like this | ||
let output = <span>James is {age} years old</span>; | ||
|
||
// use react-dom to render it | ||
// Use react-dom to render it | ||
ReactDOM.render(output, document.querySelector("#myDiv")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
|
||
// If we have a variable | ||
let age = "12"; | ||
let name = "John"; | ||
|
||
// We can use it in our html like this | ||
let output = ( | ||
<span> | ||
{name} is {age} years old | ||
</span> | ||
); | ||
|
||
// Use react-dom to render it | ||
ReactDOM.render(output, document.querySelector("#myDiv")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
|
||
const customer = { | ||
first_name: "Bob", | ||
last_name: "Dylan", | ||
}; | ||
|
||
// your code inside these <div> tags | ||
const output = ( | ||
<div> | ||
<h1>My name is {customer.first_name}</h1> | ||
<h2>My last name is {customer.last_name}</h2> | ||
</div> | ||
); | ||
|
||
// what where | ||
ReactDOM.render(output, document.querySelector("#myDiv")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.