react-native-element-timer icon indicating copy to clipboard operation
react-native-element-timer copied to clipboard

When I know two countdowns on the same page countdown the two have the same value error

Open AhmadAl-Ghalban opened this issue 3 years ago • 2 comments

When I know two countdowns on the same page and useRef defines a different countdown the two have the same value code const countdownDareRef = useRef(); const countdownRef = useRef(null); code 1 <Countdown ref={countdownRef} style={styles.timer} textStyle={{ fontSize: 20, color: '#fff', textAlign: 'center' }} initialSeconds={onEnd ? 1 : duration / 1000} formatTime="hh:mm:ss" autoStart={true} onEnd={() => { if (duration / 1000 < 0) { console.log('End', duration)

                            }
                        }}

                    />

code 2 <Countdown ref={countdownDareRef} textStyle={{ fontSize: 20, color: '#fff', textAlign: 'center' }} initialSeconds={300} formatTime="hh:mm:ss" autoStart={false} onEnd={() => { }}

                    />

To Code Teak same initialSeconds but I need different initialSeconds

AhmadAl-Ghalban avatar Sep 11 '22 09:09 AhmadAl-Ghalban

hi @AhmadAl-Ghalban , This issue is resolved. Please install later version.

hoaphantn7604 avatar Sep 15 '22 09:09 hoaphantn7604

hi @AhmadAl-Ghalban , This issue is resolved. Please install later version.

I tried it and it hasn't been resolved yet and there is a problem

AhmadAl-Ghalban avatar Sep 15 '22 11:09 AhmadAl-Ghalban