Open samuelltk opened 8 years ago
is there some exception log ?
10-27 23:09:21.858 15712-15762/com.myvictorytest A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x90cd005c in tid 15762 (mqt_js) 10-27 23:09:24.828 15712-15712/com.myvictorytest I/Choreographer: Skipped 170 frames! The application may be doing too much work on its main thread. @hongyin163
how do you update your view?
@hongyin163 i update the state per 1 seconds, the render will be run, wait for a moment, my app will crash on android...i am use the Galaxy S4, 5.0.1....My code look on the top.
时间间隔设置长一点呢? 或者使用setTimeout试试?
The app will crash when states change more times. please help me, thanks.
getRandomData(){ var data={}; data['xValues']=[]; data['yValues']=[ { data:[], label:'test1', config:{ color:'blue' } } ]; for (var i = 0; i < 50; i++) { data.xValues.push(i+''); data.yValues[0].data.push(Math.random()*100); }; return data; } componentDidMount() { var num=0; setInterval(() => { var datas=this.getRandomData(); this.setState({ randomDatas:datas }); }, 1000); } render() { return (