简体   繁体   English

如何使 React Components Dev 工具更易读/更有用?

[英]How can I make the React Components Dev tool readable / more useful?

I am trying to troubleshoot a component but find it nearly impossible to locate b.c.我正在尝试对组件进行故障排除,但发现几乎不可能找到 b.c。 the React Dev tools explicitly put all this excess information into the component hierarchy. React Dev 工具明确地将所有这些多余的信息放入组件层次结构中。

Particularly Connect Function and Context.Provider .特别是Connect FunctionContext.Provider The nesting level gets absurd.嵌套级别变得荒谬。 Maybe even ludicrous.甚至可能很荒谬。

As a side question what does memo stand for and mean?作为一个附带问题, memo代表什么意思?

It just easier to inspect the HTML directly with out the tools.无需工具直接检查 HTML 就更容易了。 Could not find a tag for React dev tools.找不到 React 开发工具的标签。

在此处输入图像描述

In dev tools if you click on the gear to get to the settings then click on the Components tab in the settings there are filtering options to hide components in the tree based on a wide variety of conditions.在开发工具中,如果您单击齿轮进入设置,然后单击设置中的“ Components ”选项卡,则有过滤选项可根据各种条件隐藏树中的组件。

You can see a little animated screenshot of this here: https://reactjs.org/blog/2019/08/15/new-react-devtools.html#where-did-all-of-the-dom-elements-go你可以在这里看到一个小动画截图: https://reactjs.org/blog/2019/08/15/new-react-devtools.html#where-did-all-of-the-dom-elements-go

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM