I found this link for determining that a webpage is using angular
尝试为 React 做同样的事情,但控制台中没有显示任何对象。
知道它是如何工作的吗?
提前致谢
最佳答案
When the page loads, the devtools sets a global named
__REACT_DEVTOOLS_GLOBAL_HOOK__
, then React communicates with that hook during initialization.
似乎其他人也发现了这一点,并且有人询问如何防止您的生产 React 应用程序与 React Devtools 一起工作:https://stackoverflow.com/a/39152804/368697
关于javascript - React Developer Tools 如何判断网页使用的是 React?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46807826/