ReactNative:RCTJSONStringify() encountered the following error:

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() encountered the following error:)