start 2.6
This commit is contained in:
parent
c699628d8d
commit
bf5fc1431d
10 changed files with 147 additions and 0 deletions
24
parts/2/phoneBook/src/App.jsx
Normal file
24
parts/2/phoneBook/src/App.jsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { useState } from "react";
|
||||
|
||||
const App = () => {
|
||||
const [persons, setPersons] = useState([{ name: "Arto Hellas" }]);
|
||||
const [newName, setNewName] = useState("");
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2>Phonebook</h2>
|
||||
<form>
|
||||
<div>
|
||||
name: <input />
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit">add</button>
|
||||
</div>
|
||||
</form>
|
||||
<h2>Numbers</h2>
|
||||
...
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
Loading…
Add table
Add a link
Reference in a new issue