美文网首页
ReactNative:RCTJSONStringify() e

ReactNative:RCTJSONStringify() e

作者: 帅气的小时 | 来源:发表于2018-12-03 10:51 被阅读0次

React Native 问题汇总:


Bug:

RCTJSONStringify() encountered the following error: Invalid number value (infinite) in JSON write.

原因:原生端在与JS端产生数据交互时是否传值中数据格式出现问题。

🌰:

CGRect result = [[[touches anyObject] view] measureLayoutRelativeToAncestor:[[touches anyObject] window]];

分析:该 result 中 origin.x y 的值为 +Inf,RN解析器成 json 时报错。

相关文章

网友评论

      本文标题:ReactNative:RCTJSONStringify() e

      本文链接:https://www.haomeiwen.com/subject/auoecqtx.html