gpt4 book ai didi

reactjs - React 选项卡不会出现在 Chrome 开发者工具中

转载 作者:行者123 更新时间:2023-12-03 13:11:32 26 4
gpt4 key购买 nike

我已经安装了 React Developer Tools Chrome 浏览器扩展。但我在开发人员工具中看不到 React 选项卡,而是有名为“Components”和“Profiler”的新选项卡。

我重新安装了扩展程序,重新启动了浏览器和计算机,在 chrome://extensions/下选中了“允许访问文件 URL”。我使用 React https://reactjs.org/tutorial/tutorial.html 导航到一个 url但 react 选项卡没有出现。然而chrome插件(浏览器右上角的react detector)表明其中有react.js。如何让 React 选项卡出现?

我正在使用“react”:“16.8.6”

最佳答案

您看不到 React 选项卡,因为 Facebook 已更新 React DevTools 以拥有组件和分析器选项卡。 ⚛️ Components 选项卡与旧版本中的 React 选项卡具有相同的用途。来自 description ,

You will get two new tabs in your Chrome DevTools: "⚛️ Components" and "⚛️ Profiler".

The Components tab shows you the root React components that were rendered on the page, as well as the subcomponents that they ended up rendering.

这可以从4.0.0版本中看出。请参阅发行说明 here

关于reactjs - React 选项卡不会出现在 Chrome 开发者工具中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57533450/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com