Skip to content

Commit

Permalink
add autoStart of useTimer in Readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
amrlabib committed Apr 14, 2021
1 parent f36a879 commit 110228b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function MyTimer({ expiryTimestamp }) {
pause,
resume,
restart,
} = useTimer({ expiryTimestamp, onExpire: () => console.warn('onExpire called') });
} = useTimer({ expiryTimestamp, autoStart: true, onExpire: () => console.warn('onExpire called') });


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


### Values

| key | Type | Description |
Expand Down

0 comments on commit 110228b

Please sign in to comment.