File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ function Counter({initialCount}) {
60
60
<>
61
61
Count: {count}
62
62
< button onClick= {() => setCount (initialCount)}> Reset< / button>
63
- < button onClick= {() => setCount (prevCount => prevCount + 1 )}> + < / button>
64
63
< button onClick= {() => setCount (prevCount => prevCount - 1 )}> - < / button>
64
+ < button onClick= {() => setCount (prevCount => prevCount + 1 )}> + < / button>
65
65
< / >
66
66
);
67
67
}
@@ -231,8 +231,8 @@ function Counter() {
231
231
return (
232
232
<>
233
233
Count: {state .count }
234
- < button onClick= {() => dispatch ({type: ' increment' })}> + < / button>
235
234
< button onClick= {() => dispatch ({type: ' decrement' })}> - < / button>
235
+ < button onClick= {() => dispatch ({type: ' increment' })}> + < / button>
236
236
< / >
237
237
);
238
238
}
@@ -290,8 +290,8 @@ function Counter({initialCount}) {
290
290
onClick={() => dispatch({type: 'reset', payload: initialCount})}>
291
291
Reset
292
292
</button>
293
- <button onClick={() => dispatch({type: 'increment'})}>+</button>
294
293
<button onClick={() => dispatch({type: 'decrement'})}>-</button>
294
+ <button onClick={() => dispatch({type: 'increment'})}>+</button>
295
295
</>
296
296
);
297
297
}
You can’t perform that action at this time.
0 commit comments