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

The countdown is not working

Open gponsu opened this issue 4 years ago • 2 comments

I think this change has broken the countdown: https://github.com/talalmajali/react-native-countdown-component/commit/28f059478f6ae9479677a3cc5b42334b73a2cc09

gponsu avatar Mar 19 '20 09:03 gponsu

What issue are you having?

thedavidpeterson avatar Mar 22 '20 08:03 thedavidpeterson

Hi, That is not working when, I call it second time in a page. I have been realize that issue came from the below update

componentDidUpdate(prevProps, prevState) { if (this.props.until !== nextProps.until || this.props.id !== nextProps.id) { if (this.props.until !== prevProps.until || this.props.id !== prevProps.id) { this.setState({ this.setState({ lastUntil: this.state.until, lastUntil: prevState.until, until: Math.max(nextProps.until, 0) until: Math.max(prevProps.until, 0) }); }); } } } }

workaround;

Screen Shot 2020-05-21 at 11 27 00

sekizlipenguen avatar May 21 '20 08:05 sekizlipenguen