react-native-progress icon indicating copy to clipboard operation
react-native-progress copied to clipboard

Failed prop type: Invalid prop `progress`

Open Rob2k9 opened this issue 7 years ago • 0 comments

the issue i have is i am using this with rn-fetch-blob now i have this providing the download progress in the format of 0.01 , 0.02 and so on all the way to 1.0 now this sometimes works and i get the error but the progress works then sometimes i get the error and the progress dose not change.

i have tried using parseInt(progress) but again the progress circle does not update but the download does continue in the background

this is my progress circle

					<Progress.Circle
						showsText={true}
						size={150}
						progress={this.state.progress}
						borderWidth={0}
						color={'rgb(0, 255, 25)'}
						unfilledColor={'rgb(121, 119, 119)'}/>

this is my progress function from downloads

		download.progress({ count : 1 },(received,total)=>{
			const percentage = (received / total).toFixed(2);
			const text = percentage;
			
			console.log('Download Progress : ' + text);
			
			this.setState({progress: parseInt(text)});
		})

Rob2k9 avatar Dec 29 '18 17:12 Rob2k9