Skip to content

Commit 110228b

Browse files
committed
add autoStart of useTimer in Readme file
1 parent f36a879 commit 110228b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function MyTimer({ expiryTimestamp }) {
3333
pause,
3434
resume,
3535
restart,
36-
} = useTimer({ expiryTimestamp, onExpire: () => console.warn('onExpire called') });
36+
} = useTimer({ expiryTimestamp, autoStart: true, onExpire: () => console.warn('onExpire called') });
3737

3838

3939
return (
@@ -73,8 +73,10 @@ export default function App() {
7373
| key | Type | Required | Description |
7474
| --- | --- | --- | ---- |
7575
| expiryTimestamp | number(timestamp) | YES | this will define for how long the timer will be running |
76+
| autoStart | boolean | No | flag to decide if timer should start automatically |
7677
| onExpire | Function | No | callback function to be executed once countdown timer is expired |
7778

79+
7880
### Values
7981

8082
| key | Type | Description |

0 commit comments

Comments
 (0)