質問編集履歴
1
内容修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,29 +22,23 @@
|
|
22
22
|
|
23
23
|
return(
|
24
24
|
|
25
|
-
<
|
25
|
+
<button
|
26
26
|
|
27
|
-
{
|
27
|
+
onClick={() => {
|
28
28
|
|
29
|
-
|
29
|
+
setItems(items.concat({id: 1, value: "hoge"})) // (1)
|
30
30
|
|
31
|
-
on
|
31
|
+
/* setItems(items?.concat({id: 1, value: "hoge"})) (2)*/
|
32
32
|
|
33
|
-
|
33
|
+
console.log(items)
|
34
34
|
|
35
|
-
|
35
|
+
}
|
36
36
|
|
37
|
-
|
37
|
+
}>
|
38
38
|
|
39
|
-
|
39
|
+
Add
|
40
40
|
|
41
|
-
}>
|
42
|
-
|
43
|
-
Add
|
44
|
-
|
45
|
-
|
41
|
+
</button>
|
46
|
-
|
47
|
-
</>
|
48
42
|
|
49
43
|
)
|
50
44
|
|