react-native-countdown-circle icon indicating copy to clipboard operation
react-native-countdown-circle copied to clipboard

How to start counting after clicking a button

Open ddiegommachado opened this issue 5 years ago • 1 comments

I'm beginner in react native. I would like to know how do I start counting after I click a button?

ddiegommachado avatar Mar 07 '19 19:03 ddiegommachado

Currently there's no way of starting the counter imperatively (PRs welcome).

You may either start the seconds prop as 0, then imperatively set it to your desired value (say 10), or you initially render one FakeCountdownCircle and conditionally render CountdownCircle whenever you want.

BernardoMariano avatar Mar 08 '19 19:03 BernardoMariano