问题描述
我正在调试使用React.js的应用程序,Chrome扩展列表清楚地显示了React Developer Tools已安装,并且当我访问我可以在开发人员工具窗口中清楚地看到反应标签。然而,当我调试我的应用程序时,我在控制台中看到了这一点:
下载React DevTools以获得更好的开发体验:http:// fb.me/react-devtools React.js:87
有人能告诉我如何使用React Developer Tools? / p>
感谢!
您不再需要做任何事情。 / p>
对于较早的反应版本,主要要求是设置window.React。如果您使用的是模块系统:
if(typeof window!=='undefined'){
window .React = React;
}
这通常应在您的主源文件中完成。
I'm debugging an application which uses React.js, the Chrome Extensions list clearly shows that the React Developer Tools are installed, and when i access the React site at http://facebook.github.io/react/ i can clearly see a "React" tab in the developer tools window. Yet when i'm debugging my application i see this in the console:
Download the React DevTools for a better development experience: http://fb.me/react-devtools React.js:87
Can someone tell me how to get it to use the React Developer Tools?
thanks!
You no longer need to do anything.
For older react versions, the main requirement is that window.React is set. If you're using a module system:
if (typeof window !== 'undefined') {
window.React = React;
}
This should usually be done in your main source file.
这篇关于反应开发工具不在Chrome浏览器中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!