ndresx / react-countdown

A customizable countdown component for React.
MIT License
746 stars 69 forks source link

It does not restart on its own, as if after completing it, if we want to start it again, then it has to rerender the entire page from scratch. #245

Closed ManojJyani0 closed 1 month ago

ManojJyani0 commented 1 year ago

it is stuck when it is completed and to start it again rereander full page with navigate to another page or somthing

ether-wan commented 1 year ago

same here

sergiors commented 8 months ago

same here

ravirasadiya commented 6 months ago

is there any update on it?

ndresx commented 5 months ago

Hi, a bit late to this, but the easiest way to restart the countdown is by providing a key "prop" to the Countdown. On completion, you can reset this key to a new value, and the countdown will remount itself.

Alternatively, you can use the countdown's API. Here is an example you could try and check out https://github.com/ndresx/react-countdown/blob/master/examples/src/CountdownApi.tsx.