File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ function MyTimer({ expiryTimestamp }) {
33
33
pause ,
34
34
resume ,
35
35
restart ,
36
- } = useTimer ({ expiryTimestamp, onExpire : () => console .warn (' onExpire called' ) });
36
+ } = useTimer ({ expiryTimestamp, autoStart : true , onExpire : () => console .warn (' onExpire called' ) });
37
37
38
38
39
39
return (
@@ -73,8 +73,10 @@ export default function App() {
73
73
| key | Type | Required | Description |
74
74
| --- | --- | --- | ---- |
75
75
| 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 |
76
77
| onExpire | Function | No | callback function to be executed once countdown timer is expired |
77
78
79
+
78
80
### Values
79
81
80
82
| key | Type | Description |
You can’t perform that action at this time.
0 commit comments