How do you debug React Native?

后端 未结 30 2790
无人共我
无人共我 2020-11-27 10:19

How does one debug their React code with React Native while the app is running in app simulator?

30条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 10:43

    To me the best way to debug on React-Native is by using "Reactotron".

    Install Reactotron then add these to your package.json:

    "reactotron-apisauce": "^1.1.2",
    "reactotron-react-native-under-37": "^1.1.2",
    "reactotron-redux": "^1.1.2", 
    

    now, it just the matter of logging in your code. e.g.: console.tron.log('debug')

提交回复
热议问题