How can I log a variable in React Native, like using console.log
when developing for web?
Option 1: Use GUI logIn simulator, press Cmd ⌘ + / , or go to Debug -> Open System Log -- both of these open a log window that displays all of the logs from your device, including the logs from your Expo app.
In App Developer MenuOn Android emulator, you need to press command + M. Debug JS Remotely − Used for activating debugging inside browser developer console. Enable Live Reload − Used for enabling live reloading whenever your code is saved. The debugger will open at localhost:8081/debugger-ui.
Use console.log
, console.warn
, etc.
As of React Native 0.29, you can simply run the following to see logs in the console:
react-native log-ios react-native log-android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With