Closed azulkipli closed 7 years ago
Hello @azulkipli, thank for opening the issue.
The CountTo component exposes a start method that you can access using refs, as follows:
CountTo
start
<CountTo ref={(element => (this.element = element))} ... /> <button onClick={() => this.element.start()}>restart</button>
I couldn't think of a use case where you need to restart the counter (without changing the props), can you please explain me a little bit more so that I can find a better solution?
Hello @azulkipli, thank for opening the issue.
The
CountTo
component exposes astart
method that you can access using refs, as follows:I couldn't think of a use case where you need to restart the counter (without changing the props), can you please explain me a little bit more so that I can find a better solution?