Timer automatically starts
BronzW opened this issue · comments
BronzW commented
Is there a way to wait for it to start until I call the start() function or does it always automatically start on initialization?
Amr Labib commented
Yeah right now for useTimer
it will start automatically on initialization
BronzW commented
is there a way to avoid that? just calling pause() won't work because it pauses on every rerender
BronzW commented
and why isn't there an autostart property on useTirmer too? useStopwatch has it.
Rony Silva commented
@BronzW Did you find a way to solve it? I'm having this problem too
Amr Labib commented
I added autoStart
to useTimer
, it should be available from v3.0.2 by default the timer will start automatically, so you will need to set the autoStart
value to false