Open usmanarif12 opened 3 years ago
i need this too
me too
Same here!!
Any update on this yet?
You can do this by having a state variable to show and hide the component. This is a work around right now.
const [isCounterVisible, setIsCounterVisible] = useState(true);
const afterCountdownMethod = () => {
// do something here
setIsCounterVisible(false)
}
const someOtherMethodWhichEnablesCounter = () => {
setIsCounterVisible(true)
}
render (
<CountDown
until={180}
onFinish={() => afterCountdownMethod}
size={20}
timeLabels={{ m: null, s: null }}
showSeparator={true}
/>
)
This is restart the counter whenever it is mounted to the DOM
Hello , could you guide me please on how to restart my timer on a button press with the same previous Untill value? i need it please help me