如何在React Native中记录变量,比如在为web开发时使用console.log

推荐答案

console.log件作品.

默认情况下,在iOS上,它会登录到Xcode内部的调试窗格.

在iOS模拟器中,按(+D)并按Remote JS Debugging.这将打开一个资源,http://localhost:8081/debugger-本地主机上的用户界面.从那里,使用Chrome开发者工具JavaScript控制台查看console.log

React-native相关问答推荐

如何在EXPO路由中重置导航

Reaction-Native-pdf文件不是PDF格式或已损坏

我们如何才能将我们自己的应用程序(IOS)排除在共享表中?

axios 在react native 中给出 [AxiosError: Network Error]

React Native Axios 通过数组的键过滤

应用程序主体尚未注册

错误发生意外错误:https://registry.yarnpkg.com/react-native-template-react-native-template-typescript:未找到

React Native StackNavigator 初始路由名称

如何更改 React Native(android)应用程序的远程推送通知图标

React Native 错误找不到模块metro-config/src/defaults/blacklist

如何在 React Native 中使用断点进行调试

通过带有对象子对象的数组react native 映射 - 与react网络中的工作方式不同?

SyntaxError:Strict mode does not allow function declarations in a lexically nested statement on a newly created app

使用 android 的应用中心分发时应用未安装错误

如何在react-native矢量图标中从多个文件导入图标?

如何将 BuildConfig 值传递给依赖模块?

React-Native ios App 在没有报告的情况下崩溃

ReactNative TextInput 不可见 iOS

使用 React Navigation 导航堆栈时重新渲染组件

如何在 React Native 中创建拖放操作?