简体   繁体   English

react devTools中的这个数字是什么意思?

[英]what does mean this number in react devTools?

I have a Nextjs app that I want to profile for performance issues.我有一个 Nextjs 应用程序,我想对其性能问题进行分析。

Im using the react dev tool profiler in chrome我在 chrome 中使用 react dev 工具分析器

I profile a specific interaction and get the flamegraph and the ranked time graph in the dev tool.我分析了一个特定的交互,并在开发工具中获取了火焰图和排名时间图。

Then this message shows up in the dev tool:然后此消息显示在开发工具中:

Why did this render?
- Hooks 1,7 and 15 changed

This part of the dev tool is not interactive, and I cant find anything on how the hooks are numbered.开发工具的这一部分不是交互式的,我找不到关于钩子如何编号的任何信息。

How do I interpret these numbers?我如何解释这些数字? What do they correspond to?它们对应什么? Where can I find the information on what hooks they refer?我在哪里可以找到有关它们所指的钩子的信息?

This is answered in this StackOverflow Post: What does the hook numbers in the Reactjs Dev tool correspond to?这在 StackOverflow 帖子中得到了回答: Reactjs Dev 工具中的钩子编号对应什么?

As per this React Pull request , the numbers correspond to those shown in the Components tab:根据这个 React Pull request ,数字对应于组件选项卡中显示的数字: 组件选项卡

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

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