react-countdown-clock
react-countdown-clock copied to clipboard
canvas re-render on state change
Hi,
Changing the seconds prop with setState causes the component to re-render over existing drawing. As soon as the timer ticks, the render looks as it should, so it's not a big problem unless the timer is paused. Then it ends up looking like in the attached screenshots.
Thanks.
Before changing seconds props:

After changing state:

This is the component: <ReactCountdownClock seconds={this.state.sessionMinutes*60} color="#000" alpha={0.9} size={300} paused={this.state.pause} />
and this is the parent state: this.state={ sessionMinutes: 8, pause: true };
Hello,
same here, any workaround regarding this?