当前位置: 移动技术网 > IT编程>移动开发>Android > RN开发中的报错以及告警

RN开发中的报错以及告警

2018年12月06日  | 移动技术网IT编程  | 我要评论

灿烈和白贤接吻照片,好心作怪24,文趣吧

 报错一:

attempted to transition from state `responder_inactive_press_in` to `responder_active_long_press_in`, which is not supported. this is most likely due to `touchable.longpressdelaytimeout` not being cancelled.

产生原因:

可能是在touchablexxx在这组组件中调用onpress方法使产生

解决方法:

关闭debug报错就不会产生,不会影响的项目的开发

告警一:

warning: can only update a mounted or mounting component. this usually means you called setstate, replacestate, or forceupdate on an unmounted component. this is a no-op.

please check the code for the windprofile component.

产生的原因:

件进行切换是调用的this.setstate未能释放/已经销毁,而造成的告警

解决方法:

componentwillunmount() {
    this.setstate = (state, callback) => {
        return;
    };
}

告警二:

warning: in next release empty section headers will be rendered. in this release you can use 'enableemptysections' flag to render empty section headers.

产生原因:

页面中存在空的数据

解决方法:

listview中添加

enableemptysections={true}

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网