talalmajali / react-native-countdown-component

React Native CountDown
MIT License
264 stars 233 forks source link

How can I get the value of the elapsed time to save it in localstorge? #105

Open ivancostilla opened 2 years ago

mutablestudio commented 1 year ago

onChange prop:

    <CountDown
        size={size}
        until={seconds}
        onFinish={(time) => {}}
        onChange={(time) => {
          console.log(`onChange={(time) => ${time}`)
        }}
        style={{marginTop: -20}}
        digitStyle={{backgroundColor: '#FFF', width: size*1.4, height: size*1.4}}
        digitTxtStyle={{color: '#000', fontWeight: '400'}}
        separatorStyle={{color: '#000', marginTop: -20, fontWeight: '400'}}
        timeToShow={['M', 'S']}
        timeLabels={{m: null, s: null}}
        showSeparator
    />