How to do logging in React Native?

前端 未结 30 3423
不思量自难忘°
不思量自难忘° 2020-11-30 17:08

How can I log a variable in React Native, like using console.log when developing for web?

30条回答
  •  一整个雨季
    2020-11-30 17:44

    There are two options to debug or get output of your react native application when using

    Emulator or Real Device

    For First Using Emulator: use

    react-native log-android or react-native log-ios

    to get the log output

    on real device.shake your device

    so the menu will come from where you select remote debug and it will open this screen in your browser. so you can see your log output in console tab.

提交回复
热议问题