简体   繁体   English

如何在 React Dev Tools Profiler 中显示“为什么要渲染”

[英]How to show "Why did this render" In React Dev Tools Profiler

I am reading this article about profiling React applications: Optimize slow React components and in the Profiler you can see "Why did this render" in the tooltip and sidebar:我正在阅读这篇关于分析 React 应用程序的文章: 优化慢速 React 组件,在 Profiler 中,您可以在工具提示和侧边栏中看到“为什么要渲染”:

在此处输入图像描述

在此处输入图像描述

Where as in my profiler there is no such information.在我的分析器中没有这样的信息。 I am using the latest version of React Native Debugger:我正在使用最新版本的 React Native Debugger:

在此处输入图像描述

How can I see / display this information?如何查看/显示此信息?

There is a setting for that, which is disabled by default apparantly:有一个设置,默认情况下显然禁用:

在此处输入图像描述

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

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