We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e5f4d2 commit 3e6e5a2Copy full SHA for 3e6e5a2
src/App.js
@@ -0,0 +1,43 @@
1
+import React, { useState } from 'react';
2
+
3
+const initalTodos = [
4
+ {
5
+ id: 'a',
6
+ task: 'Learn React',
7
+ complete: true,
8
+ },
9
10
+ id: 'b',
11
+ task: 'Learn Firebase',
12
13
14
15
+ id: 'c',
16
+ task: 'Learn GraphQL',
17
+ complete: false,
18
19
+];
20
21
+const App = () => {
22
+ const [task, setTask] = useState('');
23
24
+ const handleChangeInput = event => {
25
+ setTask(event.target.value);
26
+ };
27
28
+ return (
29
+ <div>
30
+ <ul>
31
+ {initalTodos.map(todo => (
32
+ <li key={todo.id}>
33
+ <label>{todo.task}</label>
34
+ </li>
35
+ ))}
36
+ </ul>
37
38
+ <input type="text" value={task} onChange={handleChangeInput} />
39
+ </div>
40
+ );
41
+};
42
43
+export default App;
0 commit comments