working through part 1 a
This commit is contained in:
parent
deb765ff5d
commit
b11136fc9d
12 changed files with 2935 additions and 0 deletions
28
parts/1/introdemo/src/App.jsx
Normal file
28
parts/1/introdemo/src/App.jsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
const Hello = (props) => {
|
||||
console.log(props);
|
||||
return (
|
||||
<div>
|
||||
<p>
|
||||
Hello {props.name}, you are {props.age} years old
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const App = () => {
|
||||
const name = 'Peter';
|
||||
const age = 10;
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Greetings</h1>
|
||||
<Hello name='Maya' age={26+10}/>
|
||||
<Hello name={name} age={age}/>
|
||||
<Hello />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
Loading…
Add table
Add a link
Reference in a new issue