【React Native】在React Native项目中使用rollbar-react-native记录


  1、Debug模式下会报如下错误:

  错误:Invariant Violation:Calling synchronous methods on native modules is not supported in Chrome.

  Consider providing alternative methods to expose this method in debug mode.e.g.bu exposing constants ahead-of-time.

  解决:Debug模式下,注释以下代码:

import { Client } from 'rollbar-react-native';
const rollbar = new Client('6628ae4**********575f8e2f267');

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM