Skip to content

Commit 03a181c

Browse files
committed
use timer demo minor update in restart and readme updates
1 parent 7f79b31 commit 03a181c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

demo/components/UseTimerDemo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function UseTimerDemo({ expiryTimestamp }: Object) {
2828
// Restarts to 10 minutes timer
2929
const time = new Date();
3030
time.setSeconds(time.getSeconds() + 600);
31-
restart(time);
31+
restart(time, true);
3232
}}
3333
>
3434
Restart

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default function App() {
8989
| pause | function | function to be called to pause timer |
9090
| start | function | function if called after pause the timer will continue based on original expiryTimestamp |
9191
| resume | function | function if called after pause the timer will continue countdown from last paused state |
92-
| restart | function | function to restart timer with new expiryTimestamp |
92+
| restart | function | function to restart timer with new expiryTimestamp, accept 2 arguments first is the new `expiryTimestamp` of type number(timestamp) and second is `autoStart` of type boolean to decide if it should automatically start after restart or not |
9393

9494

9595
---

0 commit comments

Comments
 (0)