From 110228bfc98b6c4789534ec3cecd8ae50ca6ba7a Mon Sep 17 00:00:00 2001 From: Amr Labib Date: Thu, 15 Apr 2021 01:30:55 +0400 Subject: [PATCH] add autoStart of useTimer in Readme file --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f747d2a..ef8b809 100644 --- a/readme.md +++ b/readme.md @@ -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 ( @@ -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 |