React Native-如何检查UI/元素? [英] React Native - how to inspect the UI/ elements?

查看:486
本文介绍了React Native-如何检查UI/元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了react dev工具.但是当我在模拟器上启动应用程序时,我的Chrome浏览器看不到它.

I have installed the react dev tool. But I can't see it my Chrome browser when I launch my app on the emulator.

如果您观看此 youtube片段,则可以看到反应"标签为在列表中,您可以检查应用程序的用户界面.

If you watch this youtube clip, you can see the react tab is in the list and you can inspect your app's UI.

知道为什么吗?

如果react dev工具不能在我的Chrome上运行,如何检查应用程序的UI/元素?

How can I inspect the app's UI/ elements if the react dev tool is not working on my Chrome?

推荐答案

Devtools当前无法进行反应".这是由于在devtools插件中评估应用程序脚本的方式发生了变化.您可以在 https://facebook.github.io/react-native/docs/known-issues.html#devtools-react-tab-does-not-work

Devtools "React" is currently not possible. This is due to a change in how the application scripts are evaluated in the devtools plugin. You can see more at https://facebook.github.io/react-native/docs/known-issues.html#devtools-react-tab-does-not-work

但是,您仍然可以在应用程序中调试UI.要检查元素,请在模拟器"中打开您的应用程序>按Cmd + D>选择显示检查器".

However, you can still debug your UI within your application. To inspect elements, open your app in Simulator > press Cmd+D > select Show Inspector.

这篇关于React Native-如何检查UI/元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆