How to do logging in React Native?

前端 未结 30 3561
不思量自难忘°
不思量自难忘° 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:23

    You use the same thing that is used for regular web. The console command also works in this case. For example, you can use console.log(), console.warn(), console.clear() etc.

    You can use Chrome Developer to use the console command when you're logging while you are running your React Native app.

提交回复
热议问题