質問編集履歴
1
リセットしたいのにStopと記述しており、紛らわしいためStopをResetに変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
```
|
20
20
|
|
21
|
-
const count
|
21
|
+
const countReset = ()=> setCount(count==0);
|
22
22
|
|
23
23
|
|
24
24
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
```
|
30
30
|
|
31
|
-
<button onClick={count
|
31
|
+
<button onClick={countReset}>リセット!</button>
|
32
32
|
|
33
33
|
|
34
34
|
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
const countDown = ()=> setCount(count-1);
|
84
84
|
|
85
|
-
const count
|
85
|
+
const countReset = ()=> setCount(count==0);
|
86
86
|
|
87
87
|
return(
|
88
88
|
|
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
<button onClick={countDown} style={{marginRight:"10px"}}>-</button>
|
98
98
|
|
99
|
-
<button onClick={count
|
99
|
+
<button onClick={countReset}>リセット!</button>
|
100
100
|
|
101
101
|
</>
|
102
102
|
|