Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onProgress: progress => {
if (progress === PROGRESS.CONNECTING) {
this.setState({connected: false});
} else if (progress === PROGRESS.READY) {
this.setState({connected: true, progress: 100});
} else {
this.setState({connected: true, progress: Math.round(PROGRESS.READY / progress * 100)});
}
},
onReady: (objects, scripts) => {